Skip to content

3.1.0

Latest
Compare
Choose a tag to compare
@jackthorley jackthorley released this 09 May 13:30
· 26 commits to master since this release

Adds the ability to get and create opt out resources.

Includes some changes and improvements to the existing tests to increase coverage for regression protection.

Usage:

  • Create an instance of the optout service

    UserPassword userPassword = new UserPassword("YourUsername","YourPassword");
    BasicServiceFactory serviceFactory = ServiceFactory.createBasicAuthenticatingFactory(userPassword);
    
    OptOutService optOutService = serviceFactory.getOptOutService();
  • Get single opt out

    OptOutResponse optout = optOutService.getOptOut("b6a39581-9cfc-40ea-9b40-9320444cf49d");
  • Get paged opt outs

    OptOutCollectionResponse optouts = optOutService.getOptOuts(1, 15);
  • Create an opt out

    FromAddress fromAddress = new FromAddress();
    fromAddress.setPhoneNumber("99887744556322");
    
    OptOutRequest request = new OptOutRequestImpl();
    request.setAccountReference("EX006789");
    request.setFromAddress(fromAddress);
    
    OptOutResponse optout = optOutService.createOptOut(request);