diff --git a/client/src/main/com/sinch/sdk/SinchClient.java b/client/src/main/com/sinch/sdk/SinchClient.java index 007ac10e..68434532 100644 --- a/client/src/main/com/sinch/sdk/SinchClient.java +++ b/client/src/main/com/sinch/sdk/SinchClient.java @@ -21,7 +21,7 @@ public class SinchClient { private static final String DEFAULT_PROPERTIES_FILE_NAME = "/config-default.properties"; - private static final String VERSION_PROPERTIES_FILE_NAME = "/version.properties"; + private static final String VERSION_PROPERTIES_FILE_NAME = "/version.properties"; private static final String OAUTH_URL_KEY = "oauth-url"; private static final String NUMBERS_SERVER_KEY = "numbers-server"; @@ -224,5 +224,4 @@ private String formatAuxiliaryFlag(String auxiliaryFlag) { } return String.join(",", values); } - } diff --git a/client/src/main/com/sinch/sdk/auth/models/BearerAuthResponse.java b/client/src/main/com/sinch/sdk/auth/models/BearerAuthResponse.java index 66c751e9..3e660522 100644 --- a/client/src/main/com/sinch/sdk/auth/models/BearerAuthResponse.java +++ b/client/src/main/com/sinch/sdk/auth/models/BearerAuthResponse.java @@ -19,7 +19,9 @@ public String getAccessToken() { return accessToken; } - /** @return Integer Token period expiration in seconds */ + /** + * @return Integer Token period expiration in seconds + */ public Integer getExpiresIn() { return expiresIn; } diff --git a/client/src/main/com/sinch/sdk/domains/numbers/models/NumberType.java b/client/src/main/com/sinch/sdk/domains/numbers/models/NumberType.java index 54e4e3bd..0b354cfb 100644 --- a/client/src/main/com/sinch/sdk/domains/numbers/models/NumberType.java +++ b/client/src/main/com/sinch/sdk/domains/numbers/models/NumberType.java @@ -14,6 +14,7 @@ public final class NumberType extends EnumDynamic { /** Numbers that belong to a specific range. */ public static final NumberType MOBILE = new NumberType("MOBILE"); + /** Numbers that are assigned to a specific geographic region. */ public static final NumberType LOCAL = new NumberType("LOCAL"); diff --git a/client/src/main/com/sinch/sdk/domains/numbers/models/OrderBy.java b/client/src/main/com/sinch/sdk/domains/numbers/models/OrderBy.java index 9dacfc1d..056274e1 100644 --- a/client/src/main/com/sinch/sdk/domains/numbers/models/OrderBy.java +++ b/client/src/main/com/sinch/sdk/domains/numbers/models/OrderBy.java @@ -13,6 +13,7 @@ public final class OrderBy extends EnumDynamic { /** Ordering by phoneNumber */ public static final OrderBy PHONE_NUMBER = new OrderBy("phoneNumber"); + /** Ordering by displayName */ public static final OrderBy DISPLAY_NAME = new OrderBy("displayName"); diff --git a/client/src/main/com/sinch/sdk/domains/numbers/models/SearchPattern.java b/client/src/main/com/sinch/sdk/domains/numbers/models/SearchPattern.java index 47a69b85..36f23293 100644 --- a/client/src/main/com/sinch/sdk/domains/numbers/models/SearchPattern.java +++ b/client/src/main/com/sinch/sdk/domains/numbers/models/SearchPattern.java @@ -19,10 +19,12 @@ public final class SearchPattern extends EnumDynamic { *

For example, to search for area code 206 in the US, you would enter, %2b1206 */ public static final SearchPattern START = new SearchPattern("START"); + /** * The number pattern entered is contained somewhere in the number, the location being undefined. */ public static final SearchPattern CONTAINS = new SearchPattern("CONTAINS"); + /** The number ends with the number pattern entered. */ public static final SearchPattern END = new SearchPattern("END"); diff --git a/client/src/main/com/sinch/sdk/domains/numbers/models/requests/AvailableRegionListAllRequestParameters.java b/client/src/main/com/sinch/sdk/domains/numbers/models/requests/AvailableRegionListAllRequestParameters.java index bd3f9bb1..a202b88d 100644 --- a/client/src/main/com/sinch/sdk/domains/numbers/models/requests/AvailableRegionListAllRequestParameters.java +++ b/client/src/main/com/sinch/sdk/domains/numbers/models/requests/AvailableRegionListAllRequestParameters.java @@ -15,7 +15,9 @@ public class AvailableRegionListAllRequestParameters { private final Collection types; - /** @param types Only return regions for which numbers are provided with the given types */ + /** + * @param types Only return regions for which numbers are provided with the given types + */ public AvailableRegionListAllRequestParameters(Collection types) { this.types = types; } diff --git a/client/src/main/com/sinch/sdk/domains/numbers/models/requests/CallbackConfigurationUpdateRequestParameters.java b/client/src/main/com/sinch/sdk/domains/numbers/models/requests/CallbackConfigurationUpdateRequestParameters.java index eeb30b2c..babc2809 100644 --- a/client/src/main/com/sinch/sdk/domains/numbers/models/requests/CallbackConfigurationUpdateRequestParameters.java +++ b/client/src/main/com/sinch/sdk/domains/numbers/models/requests/CallbackConfigurationUpdateRequestParameters.java @@ -11,7 +11,9 @@ public class CallbackConfigurationUpdateRequestParameters { /** */ private final String hmacSecret; - /** @param hmacSecret The HMAC secret to be updated for the specified project */ + /** + * @param hmacSecret The HMAC secret to be updated for the specified project + */ public CallbackConfigurationUpdateRequestParameters(String hmacSecret) { this.hmacSecret = hmacSecret; } diff --git a/client/src/main/com/sinch/sdk/domains/sms/models/DeliveryReportErrorCode.java b/client/src/main/com/sinch/sdk/domains/sms/models/DeliveryReportErrorCode.java index e2b57a2f..72a5e50a 100644 --- a/client/src/main/com/sinch/sdk/domains/sms/models/DeliveryReportErrorCode.java +++ b/client/src/main/com/sinch/sdk/domains/sms/models/DeliveryReportErrorCode.java @@ -19,63 +19,80 @@ public class DeliveryReportErrorCode extends EnumDynamic /** No delivery report callback will be sent. */ public static final DeliveryReportType NONE = new DeliveryReportType("none"); + /** A single delivery report callback will be sent. */ public static final DeliveryReportType SUMMARY = new DeliveryReportType("summary"); + /** * A single delivery report callback will be sent which includes a list of recipients per delivery * status. */ public static final DeliveryReportType FULL = new DeliveryReportType("full"); + /** * A delivery report callback will be sent for each status change of a message. This could result * in a lot of callbacks and should be used with caution for larger batches. These delivery * reports also include a timestamp of when the Delivery Report originated from the SMSC. */ public static final DeliveryReportType PER_RECIPIENT = new DeliveryReportType("per_recipient"); + /** * A delivery report callback representing the final status of a message will be sent for each * recipient. This will send only one callback per recipient, compared to the multiple callbacks diff --git a/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchBinaryRequest.java b/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchBinaryRequest.java index 9afca142..5ded5f03 100644 --- a/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchBinaryRequest.java +++ b/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchBinaryRequest.java @@ -13,6 +13,7 @@ public class SendSmsBatchBinaryRequest extends BaseBatch { private final Integer fromTon; private final Integer fromNpi; private final String udh; + /** * @param to List of Phone numbers and group IDs that will receive the batch * @param from Sender number. Must be valid phone number, short code or alphanumeric. Required if diff --git a/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchTextRequest.java b/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchTextRequest.java index 5e999643..9de8160b 100644 --- a/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchTextRequest.java +++ b/client/src/main/com/sinch/sdk/domains/sms/models/requests/SendSmsBatchTextRequest.java @@ -14,6 +14,7 @@ public class SendSmsBatchTextRequest extends BaseBatch { private final Integer maxNumberOfMessageParts; private final Integer fromTon; private final Integer fromNpi; + /** * @param to List of Phone numbers and group IDs that will receive the batch * @param from Sender number. Must be valid phone number, short code or alphanumeric. Required if diff --git a/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchBinaryRequest.java b/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchBinaryRequest.java index 4369884c..36e23f4e 100644 --- a/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchBinaryRequest.java +++ b/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchBinaryRequest.java @@ -7,6 +7,7 @@ public class UpdateSmsBatchBinaryRequest extends UpdateBaseBatchRequest { private final String udh; + /** * @param toAdd List of phone numbers and group IDs to add to the batch.List of Phone numbers and * group IDs that will receive the batch diff --git a/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchMediaRequest.java b/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchMediaRequest.java index bfef62f4..344ae0fe 100644 --- a/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchMediaRequest.java +++ b/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchMediaRequest.java @@ -10,6 +10,7 @@ public class UpdateSmsBatchMediaRequest extends UpdateBaseBatchRequest { private final Parameters parameters; private final Boolean strictValidation; + /** * @param toAdd List of phone numbers and group IDs to add to the batch. * @param body The message content diff --git a/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchTextRequest.java b/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchTextRequest.java index 4e58c227..e0a7885b 100644 --- a/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchTextRequest.java +++ b/client/src/main/com/sinch/sdk/domains/sms/models/requests/UpdateSmsBatchTextRequest.java @@ -8,6 +8,7 @@ public class UpdateSmsBatchTextRequest extends UpdateBaseBatchRequest { private final Parameters parameters; + /** * @param toAdd List of phone numbers and group IDs to add to the batch. * @param toRemove List of phone numbers and group IDs to remove from the batch. diff --git a/client/src/main/com/sinch/sdk/domains/verification/WebHooksService.java b/client/src/main/com/sinch/sdk/domains/verification/WebHooksService.java index 757b8b3b..b54699d1 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/WebHooksService.java +++ b/client/src/main/com/sinch/sdk/domains/verification/WebHooksService.java @@ -7,11 +7,11 @@ /** * Webhooks service - *

- * Callback events are used to authorize and manage your verification requests and return + * + *

Callback events are used to authorize and manage your verification requests and return * verification results. - *

- * see see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/#tag/Verification-callbacks/paths/VerificationRequestEvent/post * * @since 1.0 @@ -22,16 +22,17 @@ public interface WebHooksService { * The Sinch Platform can initiate callback requests to a URL you define (Callback URL) on request * and result events. All callback requests are signed using your Application key and secret pair * found on your dashboard. The signature is included in the Authorization header of the request + * *

By using following function, you can ensure authentication according to received payload - * from your backend

+ * from your backend * - * @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 + * @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 * @param jsonPayload Received payload * @return Is authentication is validated (true) or not (false) - * - * see https://developers.sinch.com/docs/verification/api-reference/authentication/callback-signed-request + *

see https://developers.sinch.com/docs/verification/api-reference/authentication/callback-signed-request * @since 1.0 */ boolean checkAuthentication( @@ -43,8 +44,8 @@ boolean checkAuthentication( * * @param jsonPayload Received payload to be deserialized * @return The verification event instance class - * - * see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/ + *

see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/ * @since 1.0 */ VerificationEvent unserializeVerificationEvent(String jsonPayload) throws ApiMappingException; @@ -54,9 +55,9 @@ boolean checkAuthentication( * * @param response The response to be serialized * @return The JSON string to be sent - * - * see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/ - * @since 1.0 + *

see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/ + * @since 1.0 */ String serializeVerificationResponse(VerificationResponse response) throws ApiMappingException; } diff --git a/client/src/main/com/sinch/sdk/domains/verification/adapters/StatusService.java b/client/src/main/com/sinch/sdk/domains/verification/adapters/StatusService.java index 2cb7ce56..4e693f6a 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/adapters/StatusService.java +++ b/client/src/main/com/sinch/sdk/domains/verification/adapters/StatusService.java @@ -20,14 +20,10 @@ public class StatusService implements com.sinch.sdk.domains.verification.StatusS private final QueryVerificationsApi api; public StatusService( - Configuration configuration, - HttpClient httpClient, - Map authManagers) { - this.api = new QueryVerificationsApi( - httpClient, - configuration.getVerificationServer(), - authManagers, - new HttpMapper()); + Configuration configuration, HttpClient httpClient, Map authManagers) { + this.api = + new QueryVerificationsApi( + httpClient, configuration.getVerificationServer(), authManagers, new HttpMapper()); } protected QueryVerificationsApi getApi() { diff --git a/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationService.java b/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationService.java index 0c7e10b8..e8c48736 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationService.java +++ b/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationService.java @@ -31,14 +31,16 @@ public class VerificationService implements com.sinch.sdk.domains.verification.V public VerificationService(Configuration configuration, HttpClient httpClient) { - // Currently, we are not supporting unified credentials: ensure application credentials are defined + // Currently, we are not supporting unified credentials: ensure application credentials are + // defined Objects.requireNonNull(configuration.getApplicationKey(), "'applicationKey' cannot be null"); - Objects.requireNonNull(configuration.getApplicationSecret(), - "'applicationSecret' cannot be null"); + Objects.requireNonNull( + configuration.getApplicationSecret(), "'applicationSecret' cannot be null"); this.configuration = configuration; this.httpClient = httpClient; - setApplicationCredentials(configuration.getApplicationKey(),configuration.getApplicationSecret() ); + setApplicationCredentials( + configuration.getApplicationKey(), configuration.getApplicationSecret()); } private void setApplicationCredentials(String key, String secret) { @@ -89,8 +91,7 @@ public WebHooksService webhooks() { checkCredentials(); if (null == this.webhooks) { this.webhooks = - new com.sinch.sdk.domains.verification.adapters.WebHooksService( - webhooksAuthManagers); + new com.sinch.sdk.domains.verification.adapters.WebHooksService(webhooksAuthManagers); } return this.webhooks; } diff --git a/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationsService.java b/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationsService.java index ee6dd262..ae118703 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationsService.java +++ b/client/src/main/com/sinch/sdk/domains/verification/adapters/VerificationsService.java @@ -22,14 +22,10 @@ public class VerificationsService private final SendingAndReportingVerificationsApi api; public VerificationsService( - Configuration configuration, - HttpClient httpClient, - Map authManagers) { - this.api = new SendingAndReportingVerificationsApi( - httpClient, - configuration.getVerificationServer(), - authManagers, - new HttpMapper()); + Configuration configuration, HttpClient httpClient, Map authManagers) { + this.api = + new SendingAndReportingVerificationsApi( + httpClient, configuration.getVerificationServer(), authManagers, new HttpMapper()); } protected SendingAndReportingVerificationsApi getApi() { diff --git a/client/src/main/com/sinch/sdk/domains/verification/adapters/WebHooksService.java b/client/src/main/com/sinch/sdk/domains/verification/adapters/WebHooksService.java index 201f9028..cc5d2e2e 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/adapters/WebHooksService.java +++ b/client/src/main/com/sinch/sdk/domains/verification/adapters/WebHooksService.java @@ -37,13 +37,18 @@ public boolean checkAuthentication( String authorizationKeyword = split.length > 0 ? split[0] : ""; String authorizationHash = split.length > 1 ? split[1] : ""; - String computedHash = computeHash(caseInsensitiveHeaders, authorizationKeyword, method, path, jsonPayload); + String computedHash = + computeHash(caseInsensitiveHeaders, authorizationKeyword, method, path, jsonPayload); return computedHash.equals(authorizationHash); } - private String computeHash(Map caseInsensitiveHeaders, String authorizationKeyword, - String method, String path, String jsonPayload) { + private String computeHash( + Map caseInsensitiveHeaders, + String authorizationKeyword, + String method, + String path, + String jsonPayload) { // getting content type header String contentTypeHeader = caseInsensitiveHeaders.getOrDefault("content-type", ""); diff --git a/client/src/main/com/sinch/sdk/domains/verification/adapters/converters/VerificationsDtoConverter.java b/client/src/main/com/sinch/sdk/domains/verification/adapters/converters/VerificationsDtoConverter.java index e15944e1..17b1ceb7 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/adapters/converters/VerificationsDtoConverter.java +++ b/client/src/main/com/sinch/sdk/domains/verification/adapters/converters/VerificationsDtoConverter.java @@ -205,12 +205,11 @@ public static VerificationReport convert(VerificationResponseDto dto) { switch (dto.getMethod()) { case FLASHCALL: { - VerificationReportFlashCall.Builder abuilder = - VerificationReportFlashCall.builder(); + VerificationReportFlashCall.Builder abuilder = VerificationReportFlashCall.builder(); - if (null != dto.getSource()) { - abuilder.setSource(VerificationSourceType.from(dto.getSource())); - } + if (null != dto.getSource()) { + abuilder.setSource(VerificationSourceType.from(dto.getSource())); + } if (null != dto.getPrice() && null != dto.getPrice().getVerificationPriceInformationDto()) { VerificationPriceInformationDto price = @@ -226,8 +225,7 @@ public static VerificationReport convert(VerificationResponseDto dto) { } case SMS: { - VerificationReportSMS.Builder abuilder = - VerificationReportSMS.builder(); + VerificationReportSMS.Builder abuilder = VerificationReportSMS.builder(); if (null != dto.getSource()) { abuilder.setSource(VerificationSourceType.from(dto.getSource())); } diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/LinkRelType.java b/client/src/main/com/sinch/sdk/domains/verification/models/LinkRelType.java index 846a7e82..8dd32002 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/LinkRelType.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/LinkRelType.java @@ -14,6 +14,7 @@ public class LinkRelType extends EnumDynamic { /** Get the status of a Verification. */ public static final LinkRelType STATUS = new LinkRelType("status"); + /** Report a verification */ public static final LinkRelType REPORT = new LinkRelType("report"); diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/NumberIdentity.java b/client/src/main/com/sinch/sdk/domains/verification/models/NumberIdentity.java index f6839bf6..dff579c0 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/NumberIdentity.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/NumberIdentity.java @@ -9,7 +9,9 @@ public String getEndpoint() { return endpoint; } - /** @param endpoint An E.164-compatible phone number. */ + /** + * @param endpoint An E.164-compatible phone number. + */ public NumberIdentity(String endpoint) { super("number"); this.endpoint = endpoint; diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/VerificationMethodType.java b/client/src/main/com/sinch/sdk/domains/verification/models/VerificationMethodType.java index d85a569f..65c3add9 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/VerificationMethodType.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/VerificationMethodType.java @@ -14,16 +14,19 @@ public class VerificationMethodType extends EnumDynamic { - public static final VerificationSourceType INTERCEPTED = new VerificationSourceType("intercepted"); + public static final VerificationSourceType INTERCEPTED = + new VerificationSourceType("intercepted"); public static final VerificationSourceType MANUAL = new VerificationSourceType("manual"); - /** */ private static final EnumSupportDynamic ENUM_SUPPORT = new EnumSupportDynamic<>( diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationEvent.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationEvent.java index 8daf66a0..cba0266d 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationEvent.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationEvent.java @@ -31,13 +31,16 @@ public class VerificationEvent { /** * Base class for verification event + * * @param id The ID of the verification request. * @param event The type of the event. * @param method The verification method - * @param identity Specifies the type of endpoint that will be verified and the particular endpoint. number is currently the only supported endpoint type - * @param reference The reference ID that was optionally passed together with the verification request - * @param custom A custom string that can be provided during a verification request. - * see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/ + * @param identity Specifies the type of endpoint that will be verified and the particular + * endpoint. number is currently the only supported endpoint type + * @param reference The reference ID that was optionally passed together with the verification + * request + * @param custom A custom string that can be provided during a verification request. see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/ * @since 1.0 */ @JsonCreator diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationRequestEvent.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationRequestEvent.java index 9acddd7a..6fa3e1c2 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationRequestEvent.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationRequestEvent.java @@ -12,18 +12,28 @@ public class VerificationRequestEvent extends VerificationEvent { private final Collection acceptLanguage; /** - *This event is a POST request to the specified verification callback URL and is triggered when a new verification request is made from the SDK client or the Verification Request API. This callback event is only triggered when a verification callback URL is specified in your dashboard. + * This event is a POST request to the specified verification callback URL and is triggered when a + * new verification request is made from the SDK client or the Verification Request API. This + * callback event is only triggered when a verification callback URL is specified in your + * dashboard. + * * @param id The ID of the verification request. * @param event The type of the event. * @param method The verification method - * @param identity Specifies the type of endpoint that will be verified and the particular endpoint. number is currently the only supported endpoint type - * @param reference The reference ID that was optionally passed together with the verification request + * @param identity Specifies the type of endpoint that will be verified and the particular + * endpoint. number is currently the only supported endpoint type + * @param reference The reference ID that was optionally passed together with the verification + * request * @param custom A custom string that can be provided during a verification request. * @param price The amount of money and currency of the verification request - * @param acceptLanguage Allows you to set or override if provided in the API request, the SMS verification content language. Only used with the SMS verification method. The content language specified in the API request or in the callback can be overridden by carrier provider specific templates, due to compliance and legal requirements, such as US shortcode requirements - * see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/#tag/Verification-callbacks/paths/VerificationRequestEvent/post + * @param acceptLanguage Allows you to set or override if provided in the API request, the SMS + * verification content language. Only used with the SMS verification method. The content + * language specified in the API request or in the callback can be overridden by carrier + * provider specific templates, due to compliance and legal requirements, such as US shortcode + * requirements see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/#tag/Verification-callbacks/paths/VerificationRequestEvent/post * @since 1.0 - */ + */ @JsonCreator VerificationRequestEvent( @JsonProperty("id") String id, diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponse.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponse.java index f00d4c8e..93eafbe5 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponse.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponse.java @@ -4,6 +4,7 @@ /** * Base class for verification callback response + * * @since 1.0 */ public class VerificationResponse { @@ -12,7 +13,6 @@ public class VerificationResponse { private final VerificationResponseActionType action; /** - * * @param action Determines whether the verification can be executed */ VerificationResponse(VerificationResponseActionType action) { diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseActionType.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseActionType.java index 1e18ac5c..4fed3ce5 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseActionType.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseActionType.java @@ -7,8 +7,10 @@ import java.util.stream.Stream; /** - * Determines whether the verification can be executed. - * See action type response documentation + * Determines whether the verification can be executed. See action + * type response documentation + * * @since 1.0 */ public class VerificationResponseActionType diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseCallout.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseCallout.java index 5b4082b4..ba1d749f 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseCallout.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseCallout.java @@ -2,16 +2,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; -/** - * Verification response related to call out - */ +/** Verification response related to call out */ public class VerificationResponseCallout extends VerificationResponse { @JsonProperty("callout") private final CalloutResponse callout; /** - * * @param action Determines whether the verification can be executed. * @param callout call out related information */ @@ -30,8 +27,10 @@ public String toString() { } /** - * Call out related information for call out verification callback - * See callout response documentation + * Call out related information for call out verification callback See callout + * response documentation + * * @since 1.0 */ public static class CalloutResponse { @@ -43,8 +42,9 @@ public static class CalloutResponse { private final SpeechResponse speech; /** - * - * @param code The Phone Call PIN that should be entered by the user. Sinch servers automatically generate PIN codes for Phone Call verification. If you want to set your own code, you can specify it in the response to the Verification Request Event. + * @param code The Phone Call PIN that should be entered by the user. Sinch servers + * automatically generate PIN codes for Phone Call verification. If you want to set your own + * code, you can specify it in the response to the Verification Request Event. * @param speech An object defining various properties for the text-to-speech message. */ public CalloutResponse(Integer code, SpeechResponse speech) { @@ -67,8 +67,10 @@ public String toString() { } /** - * Speech related information for SMS verification callback - * See speech response documentation + * Speech related information for SMS verification callback See speech + * response documentation + * * @since 1.0 */ public static class SpeechResponse { @@ -77,8 +79,8 @@ public static class SpeechResponse { private final String locale; /** - * - * @param locale Indicates the language that should be used for the text-to-speech message. Currently, only en-US is supported. + * @param locale Indicates the language that should be used for the text-to-speech message. + * Currently, only en-US is supported. */ public SpeechResponse(String locale) { this.locale = locale; diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseFlashCall.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseFlashCall.java index d88a5c3c..8a096de6 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseFlashCall.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseFlashCall.java @@ -2,16 +2,13 @@ import com.fasterxml.jackson.annotation.JsonProperty; -/** - * Verification response related to flash call - */ +/** Verification response related to flash call */ public class VerificationResponseFlashCall extends VerificationResponse { @JsonProperty("flashcall") private final FlashCallResponse flashCall; /** - * * @param action Determines whether the verification can be executed. * @param flashCall Flash call related information */ @@ -31,8 +28,10 @@ public String toString() { } /** - * Flash call related information for flach call verification callback - * See callout response documentation + * Flash call related information for flach call verification callback See callout + * response documentation + * * @since 1.0 */ public static class FlashCallResponse { @@ -44,9 +43,15 @@ public static class FlashCallResponse { private final Integer dialTimeout; /** - * - * @param cli The phone number that will be displayed to the user when the flashcall is received on the user's phone. By default, the Sinch dashboard will randomly select the CLI that will be displayed during a flashcall from a pool of numbers. If you want to set your own CLI, you can specify it in the response to the Verification Request Event. - * @param dialTimeout The maximum time that a flashcall verification will be active and can be completed. If the phone number hasn't been verified successfully during this time, then the verification request will fail. By default, the Sinch dashboard will automatically optimize dial time out during a flashcall. If you want to set your own dial time out for the flashcall, you can specify it in the response to the Verification Request Event. + * @param cli The phone number that will be displayed to the user when the flashcall is received + * on the user's phone. By default, the Sinch dashboard will randomly select the CLI that + * will be displayed during a flashcall from a pool of numbers. If you want to set your own + * CLI, you can specify it in the response to the Verification Request Event. + * @param dialTimeout The maximum time that a flashcall verification will be active and can be + * completed. If the phone number hasn't been verified successfully during this time, then + * the verification request will fail. By default, the Sinch dashboard will automatically + * optimize dial time out during a flashcall. If you want to set your own dial time out for + * the flashcall, you can specify it in the response to the Verification Request Event. */ public FlashCallResponse(String cli, Integer dialTimeout) { this.cli = cli; diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseSMS.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseSMS.java index 02bf30e9..7622ce72 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseSMS.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResponseSMS.java @@ -3,17 +3,14 @@ import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Collection; -/** - * Verification response related to SMS - */ +/** Verification response related to SMS */ public class VerificationResponseSMS extends VerificationResponse { @JsonProperty("sms") private final SMSResponse sms; /** - * - * @param action Determines whether the verification can be executed. + * @param action Determines whether the verification can be executed. * @param sms SMS related information */ VerificationResponseSMS(VerificationResponseActionType action, SMSResponse sms) { @@ -31,8 +28,10 @@ public String toString() { } /** - * SMS related information for SMS verification callback - * See sms response documentation + * SMS related information for SMS verification callback See sms + * response documentation + * * @since 1.0 */ public static class SMSResponse { @@ -43,8 +42,9 @@ public static class SMSResponse { private final Collection acceptLanguage; /** - * - * @param code The SMS PIN that should be used. By default, the Sinch dashboard will automatically generate PIN codes for SMS verification. If you want to set your own PIN, you can specify it in the response to the Verification Request Event. + * @param code The SMS PIN that should be used. By default, the Sinch dashboard will + * automatically generate PIN codes for SMS verification. If you want to set your own PIN, + * you can specify it in the response to the Verification Request Event. * @param acceptLanguage The SMS verification content language. Set in the verification request. */ public SMSResponse(Integer code, Collection acceptLanguage) { diff --git a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResultEvent.java b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResultEvent.java index 686eb4cb..9a033fa4 100644 --- a/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResultEvent.java +++ b/client/src/main/com/sinch/sdk/domains/verification/models/webhooks/VerificationResultEvent.java @@ -14,18 +14,25 @@ public class VerificationResultEvent extends VerificationEvent { private final VerificationSourceType source; /** - * This event is a POST request to the specified verification callback URL and triggered when a verification has been completed and the result is known. It's used to report the verification result to the developer's backend application. This callback event is only triggered when the verification callback URL is specified in your dashboard. + * This event is a POST request to the specified verification callback URL and triggered when a + * verification has been completed and the result is known. It's used to report the verification + * result to the developer's backend application. This callback event is only triggered when the + * verification callback URL is specified in your dashboard. + * * @param id The ID of the verification request. * @param event The type of the event. * @param method The verification method - * @param identity Specifies the type of endpoint that will be verified and the particular endpoint. number is currently the only supported endpoint type - * @param reference The reference ID that was optionally passed together with the verification request + * @param identity Specifies the type of endpoint that will be verified and the particular + * endpoint. number is currently the only supported endpoint type + * @param reference The reference ID that was optionally passed together with the verification + * request * @param custom A custom string that can be provided during a verification request. * @param status The status of the verification request * @param reason Displays the reason why a verification has FAILED, was DENIED, or was ABORTED - * @param source Free text that the client is sending, used to show if the call/SMS was intercepted or not. - * see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/#tag/Verification-callbacks/paths/VerificationResultEvent/post - * @since 1.0 + * @param source Free text that the client is sending, used to show if the call/SMS was + * intercepted or not. see https://developers.sinch.com/docs/verification/api-reference/verification/tag/Verification-callbacks/#tag/Verification-callbacks/paths/VerificationResultEvent/post + * @since 1.0 */ @JsonCreator VerificationResultEvent( diff --git a/client/src/main/com/sinch/sdk/models/Configuration.java b/client/src/main/com/sinch/sdk/models/Configuration.java index 21b9d164..637f59e5 100644 --- a/client/src/main/com/sinch/sdk/models/Configuration.java +++ b/client/src/main/com/sinch/sdk/models/Configuration.java @@ -2,9 +2,7 @@ import com.sinch.sdk.core.models.ServerConfiguration; -/** - * Configuration used by Sinch Client - */ +/** Configuration used by Sinch Client */ public class Configuration { private final String keyId; @@ -18,7 +16,6 @@ public class Configuration { private final String applicationKey; private final String applicationSecret; - private Configuration( String keyId, String keySecret, @@ -155,7 +152,7 @@ public ServerConfiguration getSmsServer() { * * @return SMS region * @see https://developers.sinch.com/docs/sms/api-reference/#base-url/ + * href="https://developers.sinch.com/docs/sms/api-reference/#base-url/">https://developers.sinch.com/docs/sms/api-reference/#base-url/ * @since 1.0 */ public SMSRegion getSmsRegion() { @@ -194,14 +191,14 @@ public String getVerificationUrl() { /** * Application key to be used for Verification and Voice services - *

- * Use application secret in place of unified configuration for authentication (see Sinch + * + *

Use application secret in place of unified configuration for authentication (see Sinch * dashboard for details) These credentials are related to Verification & Voice Apps * * @return Application key * @see Sinch - * Documentation + * href="https://developers.sinch.com/docs/verification/api-reference/authentication/">Sinch + * Documentation * @since 1.0 */ public String getApplicationKey() { @@ -210,14 +207,14 @@ public String getApplicationKey() { /** * Application secret to be used for Verification and Voice services - *

- * Use application secret in place of unified configuration for authentication (see Sinch + * + *

Use application secret in place of unified configuration for authentication (see Sinch * dashboard for details) These credentials are related to Verification & Voice Apps * * @return Application key * @see Sinch - * Documentation + * href="https://developers.sinch.com/docs/verification/api-reference/authentication/">Sinch + * Documentation * @since 1.0 */ public String getApplicationSecret() { @@ -232,9 +229,7 @@ public static Builder builder(Configuration configuration) { return new Builder(configuration); } - /** - * Configuration builder - */ + /** Configuration builder */ public static class Builder { private String keyId; @@ -248,8 +243,7 @@ public static class Builder { private String applicationKey; private String applicationSecret; - protected Builder() { - } + protected Builder() {} /** * Initialize a builder with existing configuration @@ -278,8 +272,16 @@ protected Builder(Configuration configuration) { */ public Configuration build() { return new Configuration( - keyId, keySecret, projectId, oauthUrl, numbersUrl, smsRegion, smsUrl, verificationUrl, - applicationKey, applicationSecret); + keyId, + keySecret, + projectId, + oauthUrl, + numbersUrl, + smsRegion, + smsUrl, + verificationUrl, + applicationKey, + applicationSecret); } /** diff --git a/client/src/main/com/sinch/sdk/models/SMSRegion.java b/client/src/main/com/sinch/sdk/models/SMSRegion.java index a8de1ba6..5d7324b3 100644 --- a/client/src/main/com/sinch/sdk/models/SMSRegion.java +++ b/client/src/main/com/sinch/sdk/models/SMSRegion.java @@ -21,10 +21,13 @@ public class SMSRegion extends EnumDynamic { /** European Union */ public static final SMSRegion EU = new SMSRegion("eu"); + /** Australia */ public static final SMSRegion AU = new SMSRegion("au"); + /** Brazil */ public static final SMSRegion BR = new SMSRegion("br"); + /** Canada */ public static final SMSRegion CA = new SMSRegion("ca"); diff --git a/client/src/test/java/com/sinch/sdk/domains/verification/adapters/WebhooksServiceTest.java b/client/src/test/java/com/sinch/sdk/domains/verification/adapters/WebhooksServiceTest.java index 5a4fcc72..7c6984f9 100644 --- a/client/src/test/java/com/sinch/sdk/domains/verification/adapters/WebhooksServiceTest.java +++ b/client/src/test/java/com/sinch/sdk/domains/verification/adapters/WebhooksServiceTest.java @@ -46,7 +46,9 @@ void checkApplicationAuthenticationFailureOnKey() throws ApiException { Map headers = Stream.of( - new AbstractMap.SimpleEntry<>("authorization", "application badkey:xfKhO0XvlRNJraahUBEJzzi1f3Fn3pYO41/ZzwOHPaQ="), + new AbstractMap.SimpleEntry<>( + "authorization", + "application badkey:xfKhO0XvlRNJraahUBEJzzi1f3Fn3pYO41/ZzwOHPaQ="), new AbstractMap.SimpleEntry<>("content-type", "application/json; charset=utf-8"), new AbstractMap.SimpleEntry<>("x-timestamp", "2023-12-01T15:01:20.0406449Z")) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); @@ -56,6 +58,7 @@ void checkApplicationAuthenticationFailureOnKey() throws ApiException { Assertions.assertThat(authenticationResult).isEqualTo(false); } + @Test void checkApplicationAuthenticationFailureOnHash() throws ApiException { @@ -75,13 +78,14 @@ void checkApplicationAuthenticationFailureOnHash() throws ApiException { @BeforeEach public void setUp() throws IOException { - Configuration configuration = Configuration.builder() - .setProjectId("unused") - .setKeyId("unused") - .setKeySecret("unused") - .setApplicationKey("789") - .setApplicationSecret("9876543210") - .build(); + Configuration configuration = + Configuration.builder() + .setProjectId("unused") + .setKeyId("unused") + .setKeySecret("unused") + .setApplicationKey("789") + .setApplicationSecret("9876543210") + .build(); webHooksService = new SinchClient(configuration).verification().webhooks(); } diff --git a/core/src/main/com/sinch/sdk/core/http/JavaTimeFormatter.java b/core/src/main/com/sinch/sdk/core/http/JavaTimeFormatter.java index 0e30ac80..4e1575d4 100644 --- a/core/src/main/com/sinch/sdk/core/http/JavaTimeFormatter.java +++ b/core/src/main/com/sinch/sdk/core/http/JavaTimeFormatter.java @@ -44,6 +44,7 @@ public OffsetDateTime parseOffsetDateTime(String str) { throw new RuntimeException(e); } } + /** * Format the given {@code OffsetDateTime} object into string. * diff --git a/core/src/main/com/sinch/sdk/core/models/ServerConfiguration.java b/core/src/main/com/sinch/sdk/core/models/ServerConfiguration.java index 5fbd3fb1..5a0dcbaa 100644 --- a/core/src/main/com/sinch/sdk/core/models/ServerConfiguration.java +++ b/core/src/main/com/sinch/sdk/core/models/ServerConfiguration.java @@ -5,7 +5,9 @@ public class ServerConfiguration { public final String url; - /** @param url A URL to the target host. */ + /** + * @param url A URL to the target host. + */ public ServerConfiguration(String url) { this.url = url; } diff --git a/core/src/main/com/sinch/sdk/core/utils/databind/JSONNavigator.java b/core/src/main/com/sinch/sdk/core/utils/databind/JSONNavigator.java index c6c3fe19..76ebb6e4 100644 --- a/core/src/main/com/sinch/sdk/core/utils/databind/JSONNavigator.java +++ b/core/src/main/com/sinch/sdk/core/utils/databind/JSONNavigator.java @@ -12,6 +12,7 @@ public class JSONNavigator { /** A map of discriminators for all model classes. */ private static final Map, ClassDiscriminatorMapping> modelDiscriminators = new HashMap<>(); + /** A map of oneOf/anyOf descendants for each model class. */ private static final Map, Map>> modelDescendants = new HashMap<>(); diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java index 90222d8d..a1cc3262 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/ActiveNumberApi.java @@ -142,6 +142,7 @@ private HttpRequest numberServiceGetActiveNumberRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * List active numbers Lists all virtual numbers for a project. * @@ -338,6 +339,7 @@ private HttpRequest numberServiceListActiveNumbersRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Release number With this endpoint, you can cancel your subscription for a specific virtual * phone number. @@ -425,6 +427,7 @@ private HttpRequest numberServiceReleaseNumberRequestBuilder(String projectId, S localVarContentTypes, localVarAuthNames); } + /** * Update active number Update a virtual phone number. For example: you can configure SMS/Voice * services or set a friendly name. To update the name that displays, modify the diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java index 5b8d74e3..cb801a8d 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/AvailableNumberApi.java @@ -149,6 +149,7 @@ private HttpRequest numberServiceGetAvailableNumberRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * List available numbers Search for virtual numbers that are available for you to activate. You * can filter by any property on the available number resource. @@ -326,6 +327,7 @@ private HttpRequest numberServiceListAvailableNumbersRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Rent any number that matches the criteria Search for and activate an available Sinch virtual * number all in one API call. Currently the rentAny operation works only for US 10DLC numbers @@ -410,6 +412,7 @@ private HttpRequest numberServiceRentAnyNumberRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Rent an available number Activate a virtual number to use with SMS products, Voice products, or * both. You'll use `smsConfiguration` to setup your number for SMS and diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java index 5f35b55f..1041b86a 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/adapters/api/v1/CallbackConfigurationApi.java @@ -120,6 +120,7 @@ private HttpRequest getCallbackConfigurationRequestBuilder(String projectId) thr localVarContentTypes, localVarAuthNames); } + /** * Update callback configuration Updates the callbacks configuration for the specified project * diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/models/dto/v1/ListAvailableRegionsResponseDto.java b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/models/dto/v1/ListAvailableRegionsResponseDto.java index f76c376a..5a1edca3 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/models/dto/v1/ListAvailableRegionsResponseDto.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/numbers/models/dto/v1/ListAvailableRegionsResponseDto.java @@ -43,7 +43,9 @@ public ListAvailableRegionsResponseDto addAvailableRegionsItem( return this; } - /** @return availableRegions */ + /** + * @return availableRegions + */ @JsonProperty(JSON_PROPERTY_AVAILABLE_REGIONS) @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) public List getAvailableRegions() { diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java index 957773cc..d9e0e135 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/BatchesApi.java @@ -140,6 +140,7 @@ private HttpRequest cancelBatchMessageRequestBuilder(String servicePlanId, Strin localVarContentTypes, localVarAuthNames); } + /** * Send delivery feedback for a message Send feedback if your system can confirm successful * message delivery. Feedback can only be provided if `feedback_enabled` was set when @@ -239,6 +240,7 @@ private HttpRequest deliveryFeedbackRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Dry run This operation will perform a dry run of a batch which calculates the bodies and number * of parts for all messages in the batch without actually sending any messages. @@ -348,6 +350,7 @@ private HttpRequest dryRunRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Get a batch message This operation returns a specific batch that matches the provided batch ID. * @@ -424,6 +427,7 @@ private HttpRequest getBatchMessageRequestBuilder(String servicePlanId, String b localVarContentTypes, localVarAuthNames); } + /** * List Batches With the list operation you can list batch messages created in the last 14 days * that you have created. This operation supports pagination. @@ -570,6 +574,7 @@ private HttpRequest listBatchesRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Replace a batch This operation will replace all the parameters of a batch with the provided * values. It is the same as cancelling a batch and sending a new one instead. @@ -658,6 +663,7 @@ private HttpRequest replaceBatchRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Send Send a message or a batch of messages. Depending on the length of the body, one message * might be split into multiple parts and charged accordingly. Any groups targeted in a scheduled @@ -737,6 +743,7 @@ private HttpRequest sendSMSRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Update a Batch message This operation updates all specified parameters of a batch that matches * the provided batch ID. diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java index af2bc6e1..1518c4a9 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/DeliveryReportsApi.java @@ -172,6 +172,7 @@ private HttpRequest getDeliveryReportByBatchIdRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Retrieve a recipient delivery report A recipient delivery report contains the message status * for a single recipient phone number. @@ -272,6 +273,7 @@ private HttpRequest getDeliveryReportByPhoneNumberRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Retrieve a list of delivery reports Get a list of finished delivery reports. This operation * supports pagination. diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java index 88ead4ca..ff082e62 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/GroupsApi.java @@ -134,6 +134,7 @@ private HttpRequest createGroupRequestBuilder(String servicePlanId, GroupObjectD localVarContentTypes, localVarAuthNames); } + /** * Delete a group This operation deletes the group with the provided group ID. * @@ -206,6 +207,7 @@ private HttpRequest deleteGroupRequestBuilder(String servicePlanId, String group localVarContentTypes, localVarAuthNames); } + /** * Get phone numbers for a group This operation retrieves the members of the group with the * provided group ID. @@ -281,6 +283,7 @@ private HttpRequest getMembersRequestBuilder(String servicePlanId, String groupI localVarContentTypes, localVarAuthNames); } + /** * List Groups With the list operation you can list all groups that you have created. This * operation supports pagination. Groups are returned in reverse chronological order. @@ -368,6 +371,7 @@ private HttpRequest listGroupsRequestBuilder(String servicePlanId, Integer page, localVarContentTypes, localVarAuthNames); } + /** * Replace a group The replace operation will replace all parameters, including members, of an * existing group with new values. Replacing a group targeted by a batch message scheduled in the @@ -458,6 +462,7 @@ private HttpRequest replaceGroupRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Retrieve a group This operation retrieves a specific group with the provided group ID. * @@ -534,6 +539,7 @@ private HttpRequest retrieveGroupRequestBuilder(String servicePlanId, String gro localVarContentTypes, localVarAuthNames); } + /** * Update a group With the update group operation, you can add and remove members in an existing * group as well as rename the group. This method encompasses a few ways to update a group: 1. By diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java index a210a142..eac4b4a9 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/sms/adapters/api/v1/InboundsApi.java @@ -211,6 +211,7 @@ private HttpRequest listInboundMessagesRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Retrieve inbound message This operation retrieves a specific inbound message with the provided * inbound ID. diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java index 60a6c2df..75a0e816 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/QueryVerificationsApi.java @@ -117,6 +117,7 @@ private HttpRequest verificationStatusByIdRequestBuilder(String id) throws ApiEx localVarContentTypes, localVarAuthNames); } + /** * Get verification by Identity Queries the verification result by sending the verification * Identity and its method. With this query you can get the result of a verification. @@ -208,6 +209,7 @@ private HttpRequest verificationStatusByIdentityRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Get verification by Reference Queries the verification result by sending the verification * Reference. With this query you can get the result of a verification. diff --git a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java index 58f2d62a..926b0113 100644 --- a/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java +++ b/openapi-contracts/src/main/com/sinch/sdk/domains/verification/adapters/api/v1/SendingAndReportingVerificationsApi.java @@ -140,6 +140,7 @@ private HttpRequest reportVerificationByIdRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Verify verification code by Identity Used to report OTP code. * @@ -239,6 +240,7 @@ private HttpRequest reportVerificationByIdentityRequestBuilder( localVarContentTypes, localVarAuthNames); } + /** * Start verification 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 an diff --git a/pom.xml b/pom.xml index 8d43d6b2..f6ee1e4e 100644 --- a/pom.xml +++ b/pom.xml @@ -270,13 +270,20 @@ com.diffplug.spotless spotless-maven-plugin 2.40.0 + + + + **/*.json + + **/*.java - **/*.java + + sample-app/src/main/java/com/sinch/sample/webhooks/verification/VerificationController.java 1.18.1 diff --git a/sample-app/src/main/java/com/sinch/sample/BaseApplication.java b/sample-app/src/main/java/com/sinch/sample/BaseApplication.java index 918836b4..14b49347 100644 --- a/sample-app/src/main/java/com/sinch/sample/BaseApplication.java +++ b/sample-app/src/main/java/com/sinch/sample/BaseApplication.java @@ -34,7 +34,6 @@ protected BaseApplication() throws IOException { : properties.getProperty(BATCH_ID_KEY); client = new SinchClient(configuration); - } public abstract void run(); diff --git a/sample-app/src/main/java/com/sinch/sample/Utils.java b/sample-app/src/main/java/com/sinch/sample/Utils.java index 4332e471..b47a7546 100644 --- a/sample-app/src/main/java/com/sinch/sample/Utils.java +++ b/sample-app/src/main/java/com/sinch/sample/Utils.java @@ -80,5 +80,4 @@ public static Configuration loadConfiguration(Logger logger) { .setApplicationSecret(verificationApiSecret) .build(); } - } diff --git a/sample-app/src/main/java/com/sinch/sample/verification/verifications/Start.java b/sample-app/src/main/java/com/sinch/sample/verification/verifications/Start.java index d48136b9..6e46e76a 100644 --- a/sample-app/src/main/java/com/sinch/sample/verification/verifications/Start.java +++ b/sample-app/src/main/java/com/sinch/sample/verification/verifications/Start.java @@ -12,8 +12,7 @@ public class Start extends BaseApplication { private static final Logger LOGGER = Logger.getLogger(Start.class.getName()); - public Start() throws IOException { - } + public Start() throws IOException {} public static void main(String[] args) { try { diff --git a/sample-app/src/main/java/com/sinch/sample/webhooks/VerificationApplication.java b/sample-app/src/main/java/com/sinch/sample/webhooks/VerificationApplication.java index 494ebd41..00511611 100644 --- a/sample-app/src/main/java/com/sinch/sample/webhooks/VerificationApplication.java +++ b/sample-app/src/main/java/com/sinch/sample/webhooks/VerificationApplication.java @@ -3,7 +3,6 @@ import com.sinch.sample.Utils; import com.sinch.sdk.SinchClient; import com.sinch.sdk.models.Configuration; -import java.util.Properties; import java.util.logging.Logger; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @@ -21,6 +20,6 @@ public static void main(String[] args) { @Bean public SinchClient sinchClient() { Configuration configuration = Utils.loadConfiguration(LOGGER); - return new SinchClient(configuration); + return new SinchClient(configuration); } }