Skip to content

Commit

Permalink
Merge pull request #90 from sinch/verification-2-0-1-javadoc
Browse files Browse the repository at this point in the history
Verification 2 0 1 javadoc
  • Loading branch information
JPPortier authored Jun 24, 2024
2 parents e940403 + 653657e commit 0cd0ddd
Show file tree
Hide file tree
Showing 64 changed files with 520 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,22 @@
*/
public interface VerificationService {

/**
* Verifications Service V1
*
* @return V1 service instance for project
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verifications/">Documentation</a>
* @since 1.1
*/
com.sinch.sdk.domains.verification.api.v1.VerificationService v1();

/**
* Verifications Service instance
* Non versioned Verifications Service instance
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationService#verificationStart()} or
* {@link com.sinch.sdk.domains.verification.api.v1.VerificationService#verificationReport()}
* @return service instance for project
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verifications/">Documentation</a>
Expand All @@ -22,8 +33,10 @@ public interface VerificationService {
VerificationsService verifications();

/**
* Status Service instance
* Non versioned Status Service instance
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationService#verificationStatus()}
* @return service instance for project
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-status/">Documentation</a>
Expand All @@ -32,8 +45,10 @@ public interface VerificationService {
VerificationStatusService verificationStatus();

/**
* Webhooks helpers instance
* Non versioned Webhooks helpers instance
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationService#webhooks()}
* @return instance service related to webhooks helpers
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/">Documentation</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.sinch.sdk.domains.verification.models.VerificationMethodType;
import com.sinch.sdk.domains.verification.models.VerificationReference;
import com.sinch.sdk.domains.verification.models.VerificationStatus;
import com.sinch.sdk.domains.verification.models.v1.VerificationMethod;

/**
* Get the status of specific verification requests in the verification process. Returns the status
Expand All @@ -22,6 +23,9 @@ public interface VerificationStatusService {
* Queries the verification result by sending the verification Identity (usually a phone number)
* and its method. With this query you can get the result of a verification.
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationStatusService#getByIdentity(com.sinch.sdk.domains.verification.models.v1.NumberIdentity,
* VerificationMethod)}
* @param identity Currently <b>Only</b> {@link
* com.sinch.sdk.domains.verification.models.NumberIdentity NumberIdentity} is supported
* @param method Method used for verification
Expand All @@ -34,6 +38,8 @@ public interface VerificationStatusService {
* Queries the verification result by sending the verification ID. With this query you can get the
* result of a verification.
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationStatusService#getById(String)}
* @param id The ID of the verification
* @return Verification status response
* @since 1.0
Expand All @@ -44,6 +50,8 @@ public interface VerificationStatusService {
* Queries the verification result by sending the verification Reference. With this query you can
* get the result of a verification
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationStatusService#getByReference(String)}
* @param reference The custom reference of the verification
* @return Verification status response
* @since 1.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
import com.sinch.sdk.domains.verification.models.response.StartVerificationResponseFlashCall;
import com.sinch.sdk.domains.verification.models.response.StartVerificationResponseSMS;
import com.sinch.sdk.domains.verification.models.response.StartVerificationResponseSeamless;
import com.sinch.sdk.domains.verification.models.v1.report.request.VerificationReportRequestFlashCall;
import com.sinch.sdk.domains.verification.models.v1.report.request.VerificationReportRequestPhoneCall;
import com.sinch.sdk.domains.verification.models.v1.report.request.VerificationReportRequestSms;
import com.sinch.sdk.domains.verification.models.v1.start.request.VerificationStartRequestData;
import com.sinch.sdk.domains.verification.models.v1.start.request.VerificationStartRequestFlashCall;
import com.sinch.sdk.domains.verification.models.v1.start.request.VerificationStartRequestPhoneCall;
import com.sinch.sdk.domains.verification.models.v1.start.request.VerificationStartRequestSms;

/**
* Verifications Service
Expand All @@ -35,6 +42,8 @@ public interface VerificationsService {
* <p>This method is used by the mobile and web Verification SDKs to start a verification. It can
* also be used to request a verification from your backend, by making a request.
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationStartService#startSms(VerificationStartRequestSms)}
* @param parameters Parameters to be used to start verification
* @return Verification response
* @since 1.0
Expand All @@ -48,6 +57,8 @@ public interface VerificationsService {
* <p>This method is used by the mobile and web Verification SDKs to start a verification. It can
* also be used to request a verification from your backend, by making a request.
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationStartService#startFlashCall(VerificationStartRequestFlashCall)}
* @param parameters Parameters to be used to start verification
* @return Verification response
* @since 1.0
Expand All @@ -62,6 +73,8 @@ StartVerificationResponseFlashCall startFlashCall(
* <p>This method is used by the mobile and web Verification SDKs to start a verification. It can
* also be used to request a verification from your backend, by making a request.
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationStartService#startPhoneCall(VerificationStartRequestPhoneCall)}
* @param parameters Parameters to be used to start verification
* @return Verification response
* @since 1.0
Expand All @@ -76,6 +89,8 @@ StartVerificationResponseCallout startCallout(
* <p>This method is used by the mobile and web Verification SDKs to start a verification. It can
* also be used to request a verification from your backend, by making a request.
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationStartService#startData(VerificationStartRequestData)}
* @param parameters Parameters to be used to start verification
* @return Verification response
* @since 1.0
Expand All @@ -89,6 +104,9 @@ StartVerificationResponseSeamless startSeamless(
*
* <p>Report the received verification code to verify it, using the identity of the user
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationReportService#reportSmsByIdentity(com.sinch.sdk.domains.verification.models.v1.NumberIdentity,
* VerificationReportRequestSms)}
* @param identity Currently <b>Only</b> {@link
* com.sinch.sdk.domains.verification.models.NumberIdentity NumberIdentity} is supported
* @param parameters Parameters to be used to get report
Expand All @@ -105,6 +123,9 @@ VerificationReportSMS reportSmsByIdentity(
*
* <p>Report the received verification code to verify it, using the identity of the user
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationReportService#reportFlashCallByIdentity(com.sinch.sdk.domains.verification.models.v1.NumberIdentity,
* VerificationReportRequestFlashCall)}
* @param identity Currently <b>Only</b> {@link
* com.sinch.sdk.domains.verification.models.NumberIdentity NumberIdentity} is supported
* @param parameters Parameters to be used to get report
Expand All @@ -121,6 +142,9 @@ VerificationReportFlashCall reportFlashCallByIdentity(
*
* <p>Report the received verification code to verify it, using the identity of the user
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationReportService#reportPhoneCallByIdentity(com.sinch.sdk.domains.verification.models.v1.NumberIdentity,
* VerificationReportRequestPhoneCall)}
* @param identity Currently <b>Only</b> {@link
* com.sinch.sdk.domains.verification.models.NumberIdentity NumberIdentity} is supported
* @param parameters Parameters to be used to get report
Expand All @@ -134,6 +158,9 @@ VerificationReportCallout reportCalloutByIdentity(
* Report the received verification code to verify it, using the Verification ID of the {@link
* com.sinch.sdk.domains.verification.models.VerificationMethodType#SMS SMS} Verification request
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationReportService#reportSmsById(String,
* VerificationReportRequestSms)}
* @param id ID returned from start verification
* @param parameters Parameters to be used to get report
* @return Verification report response
Expand All @@ -147,6 +174,9 @@ VerificationReportSMS reportSmsById(
* com.sinch.sdk.domains.verification.models.VerificationMethodType#FLASH_CALL FLASH_CALL}
* Verification request
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationReportService#reportFlashCallById(String,
* VerificationReportRequestFlashCall)}
* @param id ID returned from start verification
* @param parameters Parameters to be used to get report
* @return Verification report response
Expand All @@ -160,6 +190,9 @@ VerificationReportFlashCall reportFlashCallById(
* com.sinch.sdk.domains.verification.models.VerificationMethodType#CALLOUT CALLOUT} Verification
* request
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.VerificationReportService#reportPhoneCallById(String,
* VerificationReportRequestPhoneCall)}
* @param id ID returned from start verification
* @param parameters Parameters to be used to get report
* @return Verification report response
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.sinch.sdk.domains.verification;

import com.sinch.sdk.core.exceptions.ApiMappingException;
import com.sinch.sdk.domains.verification.models.v1.webhooks.VerificationRequestEventResponse;
import com.sinch.sdk.domains.verification.models.webhooks.VerificationEvent;
import com.sinch.sdk.domains.verification.models.webhooks.VerificationResponse;
import java.util.Map;
Expand All @@ -26,6 +27,9 @@ public interface WebHooksService {
* <p>By using following function, you can ensure authentication according to received payload
* from your backend
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.WebHooksService#validateAuthenticationHeader(String,
* String, Map, String)}
* @param method The HTTP method used ot handle the callback
* @param path The path to you backend endpoint used for callback
* @param headers Received headers
Expand All @@ -42,6 +46,8 @@ boolean validateAuthenticationHeader(
* This function can be called to deserialize received payload onto callback onto proper java
* verification event class
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.WebHooksService#parseEvent(String)}
* @param jsonPayload Received payload to be deserialized
* @return The verification event instance class
* <p>see <a
Expand All @@ -53,6 +59,8 @@ boolean validateAuthenticationHeader(
/**
* This function can be called to serialize a verification response to be sent as JSON
*
* @apiNote This version is no longer updated, to get updates use V1 version: {@link
* com.sinch.sdk.domains.verification.api.v1.WebHooksService#serializeResponse(VerificationRequestEventResponse)}
* @param response The response to be serialized
* @return The JSON string to be sent
* <p>see <a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,96 @@
import com.sinch.sdk.domains.verification.models.v1.report.response.VerificationReportResponsePhoneCall;
import com.sinch.sdk.domains.verification.models.v1.report.response.VerificationReportResponseSms;

/**
* Verification Report Service
*
* <p>Report about a verification request
*
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verifications">https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verifications</a>
* @since 1.1
*/
public interface VerificationReportService {

/**
* Report a verification using {@link
* com.sinch.sdk.domains.verification.models.v1.VerificationMethod#SMS} &amp; Identity
*
* <p>Report the received verification code to verify it, using the identity of the user
*
* @param identity Currently <b>Only</b> {@link
* com.sinch.sdk.domains.verification.models.v1.NumberIdentity NumberIdentity} is supported
* @param parameters Parameters to be used to get report
* @return Verification report response
* @since 1.1
*/
VerificationReportResponseSms reportSmsByIdentity(
NumberIdentity identity, VerificationReportRequestSms parameters);

/**
* Report a verification using {@link
* com.sinch.sdk.domains.verification.models.v1.VerificationMethod#FLASH_CALL} &amp; Identity
*
* <p>Report the received verification code to verify it, using the identity of the user
*
* @param identity Currently <b>Only</b> {@link
* com.sinch.sdk.domains.verification.models.v1.NumberIdentity NumberIdentity} is supported
* @param parameters Parameters to be used to get report
* @return Verification report response
* @since 1.1
*/
VerificationReportResponseFlashCall reportFlashCallByIdentity(
NumberIdentity identity, VerificationReportRequestFlashCall parameters);

/**
* Report a verification using {@link
* com.sinch.sdk.domains.verification.models.v1.VerificationMethod#PHONE_CALL} &amp; Identity
*
* <p>Report the received verification code to verify it, using the identity of the user
*
* @param identity Currently <b>Only</b> {@link
* com.sinch.sdk.domains.verification.models.v1.NumberIdentity NumberIdentity} is supported
* @param parameters Parameters to be used to get report
* @return Verification report response
* @since 1.1
*/
VerificationReportResponsePhoneCall reportPhoneCallByIdentity(
NumberIdentity identity, VerificationReportRequestPhoneCall parameters);

/**
* Report the received verification code to verify it, using the Verification ID of the {@link
* com.sinch.sdk.domains.verification.models.v1.VerificationMethod#SMS} Verification request
*
* @param id ID returned from start verification
* @param parameters Parameters to be used to get report
* @return Verification report response
* @since 1.1
*/
VerificationReportResponseSms reportSmsById(String id, VerificationReportRequestSms parameters);

/**
* Report the received verification code to verify it, using the Verification ID of the {@link
* com.sinch.sdk.domains.verification.models.v1.VerificationMethod#FLASH_CALL} Verification
* request
*
* @param id ID returned from start verification
* @param parameters Parameters to be used to get report
* @return Verification report response
* @since 1.1
*/
VerificationReportResponseFlashCall reportFlashCallById(
String id, VerificationReportRequestFlashCall parameters);

/**
* Report the received verification code to verify it, using the Verification ID of the {@link
* com.sinch.sdk.domains.verification.models.v1.VerificationMethod#PHONE_CALL} Verification
* request
*
* @param id ID returned from start verification
* @param parameters Parameters to be used to get report
* @return Verification report response
* @since 1.1
*/
VerificationReportResponsePhoneCall reportPhoneCallById(
String id, VerificationReportRequestPhoneCall parameters);
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,51 @@
package com.sinch.sdk.domains.verification.api.v1;

/**
* Verification Domain Level Service
*
* @see <a
* href="https://developers.sinch.com/docs/verification">https://developers.sinch.com/docs/verification</a>
* @since 1.1
*/
public interface VerificationService {

/**
* Verifications Start Service instance
*
* @return service instance for project
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verifications">Documentation</a>
* @since 1.1
*/
VerificationStartService verificationStart();

/**
* Verifications Report Service instance
*
* @return service instance for project
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verifications">Documentation</a>
* @since 1.1
*/
VerificationReportService verificationReport();

/**
* Verifications Status Service instance
*
* @return service instance for project
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-status">Documentation</a>
* @since 1.1
*/
VerificationStatusService verificationStatus();

/**
* Webhooks helpers instance
*
* @return service instance for project
* @see <a
* href="https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks">Documentation</a>
* @since 1.1
*/
WebHooksService webhooks();
}
Loading

0 comments on commit 0cd0ddd

Please sign in to comment.