diff --git a/client/src/main/com/sinch/sdk/domains/verification/VerificationStatusService.java b/client/src/main/com/sinch/sdk/domains/verification/VerificationStatusService.java index 3b52a80c..ddc66971 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/VerificationStatusService.java +++ b/client/src/main/com/sinch/sdk/domains/verification/VerificationStatusService.java @@ -28,7 +28,7 @@ public interface VerificationStatusService { * @return Verification report response * @since 1.0 */ - VerificationReport get(NumberIdentity identity, VerificationMethodType method); + VerificationReport getByIdentity(NumberIdentity identity, VerificationMethodType method); /** * Queries the verification result by sending the verification ID. With this query you can get the @@ -38,7 +38,7 @@ public interface VerificationStatusService { * @return Verification report response * @since 1.0 */ - VerificationReport get(VerificationId id); + VerificationReport getById(VerificationId id); /** * Queries the verification result by sending the verification Reference. With this query you can @@ -48,5 +48,5 @@ public interface VerificationStatusService { * @return Verification report response * @since 1.0 */ - VerificationReport get(VerificationReference reference); + VerificationReport getByReference(VerificationReference reference); } diff --git a/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationStatusService.java b/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationStatusService.java index 2f1b6208..e5c2083e 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationStatusService.java +++ b/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationStatusService.java @@ -29,18 +29,18 @@ protected QueryVerificationsApi getApi() { return this.api; } - public VerificationReport get(NumberIdentity identity, VerificationMethodType method) { + public VerificationReport getByIdentity(NumberIdentity identity, VerificationMethodType method) { return VerificationsDtoConverter.convert( getApi().verificationStatusByIdentity("number", identity.getEndpoint(), method.value())); } - public VerificationReport get(VerificationId id) { + public VerificationReport getById(VerificationId id) { return VerificationsDtoConverter.convert(getApi().verificationStatusById(id.getId())); } - public VerificationReport get(VerificationReference reference) { + public VerificationReport getByReference(VerificationReference reference) { return VerificationsDtoConverter.convert( getApi().verificationStatusByReference(reference.getReference())); diff --git a/client/src/test/java/com/sinch/sdk/domains/verification/adapters/VerificationStatusServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/verification/adapters/VerificationStatusServiceTest.java index d066f62a..b456ef84 100644 --- a/client/src/test/java/com/sinch/sdk/domains/verification/adapters/VerificationStatusServiceTest.java +++ b/client/src/test/java/com/sinch/sdk/domains/verification/adapters/VerificationStatusServiceTest.java @@ -48,7 +48,7 @@ void getByIdentity() throws ApiException { .thenReturn(VerificationReportDtoTest.expectedVerificationCalloutDto); VerificationReport response = - service.get( + service.getByIdentity( NumberIdentity.builder().setEndpoint("endpoint string").build(), VerificationMethodType.SMS); @@ -63,7 +63,7 @@ void getById() throws ApiException { when(api.verificationStatusById(eq("the id"))) .thenReturn(VerificationReportDtoTest.expectedVerificationCalloutDto); - VerificationReport response = service.get(VerificationId.valueOf("the id")); + VerificationReport response = service.getById(VerificationId.valueOf("the id")); Assertions.assertThat(response) .usingRecursiveComparison() @@ -76,7 +76,8 @@ void getByReference() throws ApiException { when(api.verificationStatusByReference(eq("the reference"))) .thenReturn(VerificationReportDtoTest.expectedVerificationCalloutDto); - VerificationReport response = service.get(VerificationReference.valueOf("the reference")); + VerificationReport response = + service.getByReference(VerificationReference.valueOf("the reference")); Assertions.assertThat(response) .usingRecursiveComparison() diff --git a/sample-app/src/main/java/com/sinch/sample/verification/status/GetById.java b/sample-app/src/main/java/com/sinch/sample/verification/status/GetById.java index 07c5eaf3..5c3e3b89 100644 --- a/sample-app/src/main/java/com/sinch/sample/verification/status/GetById.java +++ b/sample-app/src/main/java/com/sinch/sample/verification/status/GetById.java @@ -27,7 +27,7 @@ public void run() { LOGGER.info("Get status by id for : " + id); - VerificationReport response = client.verification().verificationStatus().get(id); + VerificationReport response = client.verification().verificationStatus().getById(id); LOGGER.info("Response :" + response); } } diff --git a/sample-app/src/main/java/com/sinch/sample/verification/status/GetByIdentity.java b/sample-app/src/main/java/com/sinch/sample/verification/status/GetByIdentity.java index e918f4a2..f913f4cd 100644 --- a/sample-app/src/main/java/com/sinch/sample/verification/status/GetByIdentity.java +++ b/sample-app/src/main/java/com/sinch/sample/verification/status/GetByIdentity.java @@ -30,7 +30,8 @@ public void run() { VerificationMethodType method = VerificationMethodType.SMS; - VerificationReport response = client.verification().verificationStatus().get(identity, method); + VerificationReport response = + client.verification().verificationStatus().getByIdentity(identity, method); LOGGER.info("Response :" + response); } } diff --git a/sample-app/src/main/java/com/sinch/sample/verification/status/GetByReference.java b/sample-app/src/main/java/com/sinch/sample/verification/status/GetByReference.java index a62c9c30..dfd8e465 100644 --- a/sample-app/src/main/java/com/sinch/sample/verification/status/GetByReference.java +++ b/sample-app/src/main/java/com/sinch/sample/verification/status/GetByReference.java @@ -27,7 +27,8 @@ public void run() { LOGGER.info("Get status by reference for: '" + reference + "'"); - VerificationReport response = client.verification().verificationStatus().get(reference); + VerificationReport response = + client.verification().verificationStatus().getByReference(reference); LOGGER.info("Response :" + response); } }