private String subscriberName;
private String subscriberType;
+
+ private String resourceVersion;
@JsonCreator
public AAICustomer(
@JsonProperty("global-customer-id") String globalCustomerId,
@JsonProperty("subscriber-name") String subscriberName,
- @JsonProperty("subscriber-type") String subscriberType) {
+ @JsonProperty("subscriber-type") String subscriberType,
+ @JsonProperty("resource-version") String resourceVersion) {
this.globalCustomerId = globalCustomerId;
this.subscriberName = subscriberName;
this.subscriberType = subscriberType;
+ this.resourceVersion = resourceVersion;
}
@JsonProperty("global-customer-id")
public String getSubscriberType() {
return subscriberType;
}
+
+ @JsonProperty("resource-version")
+ public String getResourceVersion() {
+ return resourceVersion;
+ }
}
@Test
public void testAAICustomer() throws Exception {
- AAICustomer ac = new AAICustomer("globalCustomerId", "subscriberName", "subscriberType");
+ AAICustomer ac = new AAICustomer("globalCustomerId", "subscriberName", "subscriberType","resourceVersion");
ac.getGlobalCustomerId();
ac.getSubscriberName();
ac.getSubscriberType();
@Test
public void itCanRetrieveCustomersFromAAI() {
- List<AAICustomer> customers = singletonList(new AAICustomer("1", "name", "type"));
+ List<AAICustomer> customers = singletonList(new AAICustomer("1", "name", "type","version"));
AAIService aaiService = mock(AAIService.class);
AAICustomerRsp rsp = new AAICustomerRsp();
AAIService aaiService = mock(AAIService.class);
CustomerService customerService = new DefaultCustomerService(aaiService);
String customerId="1";
- AAICustomer customer = new AAICustomer(customerId, customerId, customerId);
+ AAICustomer customer = new AAICustomer(customerId, customerId, customerId,customerId);
when(aaiService.getCustomerById(eq(customerId))).thenReturn(successfulCall(customer));
customerService.getCustomerById(customerId);
}