Releases: department-of-veterans-affairs/notifications-java-client
Releases · department-of-veterans-affairs/notifications-java-client
2.0.0
Changes in 2.0.0
- Added GSON library as dependency
- Refactored all JSON serialization and deserialization to use GSON
Breaking changes
-
Removed deprecated
sendEmail
andsendSms
methods.You have to use
new EmailRequest.Builder()
andnew SmsRequest.Builder()
to fluently construct your requests starting with version 2.
Download binary from GH Package Maven Repository
1.2.0
Changes in 1.2.0
-
Added support for sending notification requests with recipient identifiers supported by Master Person Index.
Identifiers will be used to lookup contact information (email, phone number) as well as contact preferences in VA Profile.Currently supported identifiers include:
ICN
VA Profile Id
Participant Id
Birls Id (FileNumber)
EDIPI
You can send requests that contain only recipient identifier, for example:
SendEmailResponse response = client.sendEmail(new EmailRequest.Builder()
.withTemplateId("aTemplateId")
.withRecipientIdentifier(new Identifier(IdentifierType.VAPROFILEID, "some-id");
.build()
);
Or you can specify both email / phone number and identifier. In that case identifier will be only used to lookup preferences.
SendEmailResponse response = client.sendEmail(new EmailRequest.Builder()
.withTemplateId("aTemplateId")
.withEmailAddress("[email protected]")
.withRecipientIdentifier(new Identifier(IdentifierType.VAPROFILEID, "some-id");
.build()
);
- Moved all tests to Junit5.
Download binary from GH Package Maven Repository
1.1.0
Changes in 1.1.0
- Added EmailRequest with a fluent builder to avoid constructors with lots of same type optional arguments.
You can use it as follows:SendEmailResponse response = client.sendEmail(new EmailRequest.Builder() .withTemplateId("aTemplateId") .withEmailAddress("[email protected]") .withPersonalisation(emptyMap()) .withReference("aReference") .withBillingCode("aBillingCode") .withEmailReplyToId("aEmailReplyToId") .build() );
- Deprecated following NotificationClientApi sendEmail methods:
@Deprecated SendEmailResponse sendEmail(String templateId, String emailAddress, Map<String, ?> personalisation, String reference, String billingCode) throws NotificationClientException; @Deprecated SendEmailResponse sendEmail(String templateId, String emailAddress, Map<String, ?> personalisation, String reference, String billingCode, String emailReplyToId) throws NotificationClientException;
- Added SmsRequest with a fluent builder to avoid constructors with lots of same type optional arguments.
You can use it as follows:client.sendSms(new SmsRequest.Builder() .withTemplateId("aTemplateId") .withPhoneNumber("aPhoneNumber") .withPersonalisation(emptyMap()) .withReference("aReference") .withBillingCode("aBillingCode") .withSmsSenderId("aSmsSenderId") .build() );
- Deprecated following NotificationClientApi sendSms methods:
@Deprecated SendSmsResponse sendSms(String templateId, String phoneNumber, Map<String, ?> personalisation, String reference, String billingCode) throws NotificationClientException; @Deprecated SendSmsResponse sendSms(String templateId, String phoneNumber, Map<String, ?> personalisation, String reference, String billingCode, String smsSenderId) throws NotificationClientException;