Skip to content

Latest commit

 

History

History
255 lines (200 loc) · 11.7 KB

CHANGELOG.md

File metadata and controls

255 lines (200 loc) · 11.7 KB

2.0.3

  • Upgraded the jose4j and gson dependency versions

2.0.2

  • Renamed default branch from 'master' to 'main'

2.0.0

  • Added GSON library as dependency
  • Refactored all JSON serialization and deserialization to use GSON

Breaking changes

  • Removed deprecated sendEmail and sendSms methods.

    You have to use new EmailRequest.Builder() and new SmsRequest.Builder() to fluently construct your requests starting with version 2.

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.

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;
    

1.0.0

  • Forked client for U.S. Department of Veterans Affairs
  • Renamed project to vanotify-java-client. Updated repositories, links, urls. etc
  • Added support for billing_code in Email and SMS requests.

3.17.2-RELEASE

  • Updated dependencies to latest versions

3.17.1-RELEASE

  • Minor patch release, changes to pom.xml including adding a license, contact details and more.

3.17.0-RELEASE

  • Add letterContactBlock to the Template model.
  • We've added letter_contact_block to our API responses when callinggetTemplateById, getTemplateVersion and getAllTemplates. This release updates our Template model to include this new property.

3.16.0-RELEASE

  • Add support for an optional isCsv parameter in the prepareUpload() function. This fixes a bug when sending a CSV file by email. This ensures that the file is downloaded as a CSV rather than a TXT file.

3.15.3-RELEASE

  • Fixes issue #171 with null pointer exception on reading the errorstream

3.15.2-RELEASE

  • Change error messages to refer to file, not document.

3.15.1-RELEASE

  • Added 400 has a default value for the httpResult value of a NotificationClientException.
  • there are some cases when the exception is thrown from the client and not from the API, even though a httpResult. All the exceptions raised can be classified as 400, therefore using 400 as a default.

3.15.0-RELEASE

  • Added NotificationClient.getPdfForLetter function
    • accepts String notificationId
    • returns a byte[] containing the final printable PDF for a precompiled or templated letter

3.14.2-RELEASE

  • Updated old dependencies
  • Updated code to bring in linting standards.

3.14.1-RELEASE

  • Updated project properties to use UTF-8
  • Updated GET and POST to use UTF-8 readers and writers

3.14.0-RELEASE

  • Added postage argument to NotificationClient.sendPrecompiledLetter and NotificationClient.sendPrecompiledLetterWithInputStream
  • Added postage to LetterResponse
  • Added postage to Notification
  • Added html to TemplatePreview

3.13.0-RELEASE

  • Allow passing of Lists into the personalisation Map to display as a bulleted list in the message.

3.12.0-RELEASE

  • Added NotificationClient.prepareUpload method that can be used if you want to upload a document and send a link to that docuemnt by email.
    • Takes a byte[] of document contents
    • You then add the returned JSONObject to the personalisation map.
    • NOTE: the personalisation map for this call needs to be HashMap<String, Object>
      • which is why the sendEmail no uses a wildcard for the generic definition of the personalisation HashMap

3.11.0-RELEASE

  • Updated Template to have name, the name of the template as set in Notify.

3.10.0-RELEASE

  • Updated Notification to have an Optional createdByName. If the notification was sent manually, this will be the name of the sender. If the notification was sent through the API, this will be Optional.empty().
  • New method, sendPrecompiledLetterWithInputStream, to send a precompiled letter using an InputStream rather than a file.

3.9.2-RELEASE

  • Updated testEmailNotificationWithoutPersonalisationReturnsErrorMessageIT to only look for the BadRequestError rather than the json "error": BadRequestError

3.9.1-RELEASE

  • Response to sendPrecompiledLetter updated
    • The response now only includes the notification id and the client reference

3.9.0-RELEASE

  • sendPrecompiledLetter added to NotificationClient
    • The client can now send PDF files which conform to the Notify printing template
    • Send a Java File object or a base64 encoded string
    • 'reference' must be provided to identify the document

3.8.0-RELEASE

  • Added getTextMessages(String olderThan) method to fetch received text messages.

3.7.0-RELEASE

  • Update to NotificationsAPIClient.sendSms()
    • added smsSenderId: an optional smsSenderId specified when adding text message senders under service settings, if this is not provided the default text message sender for the service will be used. smsSenderId can be omitted.

3.6.0-RELEASE

  • Update to NotificationsAPIClient.sendEmail()
    • added emailReplyToId: an optional email_reply_to_id specified when adding Email reply to addresses under service settings, if this is not provided the reply to email will be the service default reply to email. emailReplyToId can be omitted.

3.5.1-RELEASE

  • Attached source and javadoc artifacts to jar

3.5.0-RELEASE

  • Template now contains personalisation, a map of the template placeholder names.

3.4.0-RELEASE

  • Notification now contains estimatedDelivery
    • Shows when the letter is expected to be picked up by Royal Mail from our printing providers.
    • null for sms and email.
  • NotificationClientApi interface updated to include `sendLetter`` functionality.

3.3.0-RELEASE

  • sendLetter added to NotificationClient
    • SendLetterResponse sendLetter(String templateId, Map<String, String> personalisation, String reference) throws NotificationClientException
    • personalisation map is required, and must contain the recipient's address details.
    • as with sms and email, reference is optional.

3.2.0-RELEASE

  • Template endpoints added to the NotificationClient
  • getTemplateById - get the latest version of a template by id.
  • getTemplateVersion - get the template by id and version.
  • getAllTemplates - get all templates, can be filtered by template type.
  • generateTemplatePreview - get the contents of a template with the placeholders replaced with the given personalisation.
  • See the README for more information about the new template methods.

3.1.3-RELEASE

Changed

3.1.2-RELEASE

Changed

  • Added SSLContext to NotificationClient constructor, to allow clients to be created with a specified SSL Context.

3.1.1-RELEASE

Fixed

  • The Client UserAgent is now populated correctly.

3.1.0-RELEASE

Changed

  • NotificationClientException now has a getter for the httpResult, NotificationClientException.getHttpResult()
  • Added NotificationClientApi interface for NotificationClient
    • The interface is useful if you want to stub the NotificationClient for tests.

3.0.0-RELEASE

Changed

  • Using version 2 of the notification-api.
  • Update to NotificationClient.sendSms():
    • added reference: an optional unique identifier for the notification or an identifier for a batch of notifications. reference can be an empty string or null.
    • returns SendSmsResponse, this object only contains the necessary information about the notification.
    • only one method signature: public SendSmsResponse sendSms(String templateId, String phoneNumber, HashMap<String, String> personalisation, String reference) throws NotificationClientException; Where personalisation can be an empty map or null and reference can be an empty string or null.
  • Update to NotificationClient.sendEmail():
    • added reference: an optional unique identifier for the notification or an identifier for a batch of notifications. reference can be an empty string or null.
    • returns SendEmailResponse, this object only contains the necessary information about the notification.
    • only one method signature: public SendEmailResponse sendEmail(String templateId, String emailAddress, HashMap<String, String> personalisation, String reference) throws NotificationClientException; Where personalisation can be an empty map or null and reference can be an empty string or null.
  • Notification class has been changed; return type of NotificationClient.getNotificationById(id), see the README for details.
  • NotificationClient.getAllNotifications()
    • Notifications can be filtered by reference, see the README for details.
    • Notifications can be filtered by olderThanId, see the README for details.
    • NotificationList response has changed, see the README for details.
  • NotificationClient removed the constructors containing the serviceId, which is no longer needed because the api key contains the service id.