From 9ddd9d50595753f1a8b334546526a873fa1d7beb Mon Sep 17 00:00:00 2001 From: speakeasybot Date: Mon, 11 Mar 2024 17:14:28 +0000 Subject: [PATCH] ci: regenerated with OpenAPI Doc 1.0.0, Speakeasy CLI 1.205.2 --- .speakeasy/gen.lock | 18 +++++++++--------- README.md | 17 +++++++++-------- RELEASES.md | 10 +++++++++- USAGE.md | 13 +++++++------ ...nse.md => CreateAuthenticationResponse.md} | 2 +- docs/models/shared/Code.md | 4 +++- .../shared/CreateAuthenticationRequest.md | 3 ++- docs/models/shared/ErrorResponse.md | 10 +++++----- docs/sdks/otp/README.md | 19 ++++++++++--------- gen.yaml | 4 +++- lib/build.gradle | 2 +- lib/src/main/java/live/ding/dingSdk/Otp.java | 4 ++-- .../live/ding/dingSdk/SDKConfiguration.java | 6 +++--- ...java => CreateAuthenticationResponse.java} | 14 +++++++------- .../live/ding/dingSdk/models/shared/Code.java | 4 +++- .../shared/CreateAuthenticationRequest.java | 12 ++++++++++++ .../dingSdk/models/shared/ErrorResponse.java | 1 + 17 files changed, 87 insertions(+), 56 deletions(-) rename docs/models/operations/{CreateAutenticationResponse.md => CreateAuthenticationResponse.md} (99%) rename lib/src/main/java/live/ding/dingSdk/models/operations/{CreateAutenticationResponse.java => CreateAuthenticationResponse.java} (62%) diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f46cea4..29a7f5a 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,21 +1,21 @@ lockVersion: 2.0.0 id: fd2a78ee-286d-4e3c-ab3c-507a8f89f511 management: - docChecksum: 01bd42610039f89b431afa7eb1a3c56c + docChecksum: a2a29dc8a8df536c8b2553db26987fad docVersion: 1.0.0 - speakeasyVersion: internal - generationVersion: 2.263.3 - releaseVersion: 0.4.0 - configChecksum: 42c8d1f652d0f14447f13f9cc3249d23 + speakeasyVersion: 1.205.2 + generationVersion: 2.279.1 + releaseVersion: 0.4.1 + configChecksum: cd13d3a63f6e78edeb94a9e709461c79 repoURL: https://github.com/ding-live/ding-java.git repoSubDirectory: . published: true features: java: - core: 3.5.1 + core: 3.5.2 examples: 2.81.3 flattening: 2.81.1 - globalSecurity: 2.81.2 + globalSecurity: 2.81.4 globalServerURLs: 2.82.1 generatedFiles: - lib/src/main/java/live/ding/dingSdk/SDKConfiguration.java @@ -52,7 +52,7 @@ generatedFiles: - lib/src/main/java/live/ding/dingSdk/utils/Types.java - lib/src/main/java/live/ding/dingSdk/utils/Utils.java - lib/src/main/java/live/ding/dingSdk/models/operations/CheckResponse.java - - lib/src/main/java/live/ding/dingSdk/models/operations/CreateAutenticationResponse.java + - lib/src/main/java/live/ding/dingSdk/models/operations/CreateAuthenticationResponse.java - lib/src/main/java/live/ding/dingSdk/models/operations/RetryResponse.java - lib/src/main/java/live/ding/dingSdk/models/operations/LookupRequest.java - lib/src/main/java/live/ding/dingSdk/models/operations/LookupResponse.java @@ -72,7 +72,7 @@ generatedFiles: - lib/src/main/java/live/ding/dingSdk/models/shared/LookupResponse.java - lib/src/main/java/live/ding/dingSdk/models/shared/Security.java - docs/models/operations/CheckResponse.md - - docs/models/operations/CreateAutenticationResponse.md + - docs/models/operations/CreateAuthenticationResponse.md - docs/models/operations/RetryResponse.md - docs/models/operations/LookupRequest.md - docs/models/operations/LookupResponse.md diff --git a/README.md b/README.md index 5f0d7ad..1a95791 100755 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ The Ding Java library provides convenient access to the Ding API from applicatio ### Gradle ```groovy -implementation 'live.ding.dingSdk:ding:0.4.0' +implementation 'live.ding.dingSdk:ding:0.4.1' ``` @@ -26,7 +26,7 @@ Send an OTP code to a user's phone number. package hello.world; import live.ding.dingSdk.Ding; -import live.ding.dingSdk.models.operations.CreateAutenticationResponse; +import live.ding.dingSdk.models.operations.CreateAuthenticationResponse; import live.ding.dingSdk.models.shared.CreateAuthenticationRequest; import live.ding.dingSdk.models.shared.DeviceType; import live.ding.dingSdk.models.shared.Security; @@ -42,21 +42,22 @@ public class Application { .build(); live.ding.dingSdk.models.shared.CreateAuthenticationRequest req = new CreateAuthenticationRequest( - "eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc", + "c9f826e0-deca-41ec-871f-ecd6e8efeb46", "+1234567890"){{ appRealm = ""; appVersion = ""; - callbackUrl = "http://silly-credit.name"; + callbackUrl = "https://thin-television.name"; deviceId = ""; deviceModel = ""; - deviceType = DeviceType.WEB; - ip = "97.139.118.123"; + deviceType = DeviceType.ANDROID; + ip = "176.157.112.67"; isReturningUser = false; osVersion = ""; + templateId = ""; }}; - live.ding.dingSdk.models.operations.CreateAutenticationResponse res = sdk.otp.createAutentication(req); + live.ding.dingSdk.models.operations.CreateAuthenticationResponse res = sdk.otp.createAuthentication(req); if (res.createAuthenticationResponse != null) { // handle response @@ -154,7 +155,7 @@ public class Application { ### [otp](docs/sdks/otp/README.md) * [check](docs/sdks/otp/README.md#check) - Check a code -* [createAutentication](docs/sdks/otp/README.md#createautentication) - Send a code +* [createAuthentication](docs/sdks/otp/README.md#createauthentication) - Send a code * [retry](docs/sdks/otp/README.md#retry) - Perform a retry ### [lookup](docs/sdks/lookup/README.md) diff --git a/RELEASES.md b/RELEASES.md index 6321ef7..42db296 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -38,4 +38,12 @@ Based on: - OpenAPI Doc 1.0.0 - Speakeasy CLI 1.185.0 (2.263.3) https://github.com/speakeasy-api/speakeasy ### Generated -- [java v0.4.0] . \ No newline at end of file +- [java v0.4.0] . + +## 2024-03-11 17:14:17 +### Changes +Based on: +- OpenAPI Doc 1.0.0 +- Speakeasy CLI 1.205.2 (2.279.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v0.4.1] . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index f28b3be..b16b54f 100644 --- a/USAGE.md +++ b/USAGE.md @@ -8,7 +8,7 @@ Send an OTP code to a user's phone number. package hello.world; import live.ding.dingSdk.Ding; -import live.ding.dingSdk.models.operations.CreateAutenticationResponse; +import live.ding.dingSdk.models.operations.CreateAuthenticationResponse; import live.ding.dingSdk.models.shared.CreateAuthenticationRequest; import live.ding.dingSdk.models.shared.DeviceType; import live.ding.dingSdk.models.shared.Security; @@ -24,21 +24,22 @@ public class Application { .build(); live.ding.dingSdk.models.shared.CreateAuthenticationRequest req = new CreateAuthenticationRequest( - "eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc", + "c9f826e0-deca-41ec-871f-ecd6e8efeb46", "+1234567890"){{ appRealm = ""; appVersion = ""; - callbackUrl = "http://silly-credit.name"; + callbackUrl = "https://thin-television.name"; deviceId = ""; deviceModel = ""; - deviceType = DeviceType.WEB; - ip = "97.139.118.123"; + deviceType = DeviceType.ANDROID; + ip = "176.157.112.67"; isReturningUser = false; osVersion = ""; + templateId = ""; }}; - live.ding.dingSdk.models.operations.CreateAutenticationResponse res = sdk.otp.createAutentication(req); + live.ding.dingSdk.models.operations.CreateAuthenticationResponse res = sdk.otp.createAuthentication(req); if (res.createAuthenticationResponse != null) { // handle response diff --git a/docs/models/operations/CreateAutenticationResponse.md b/docs/models/operations/CreateAuthenticationResponse.md similarity index 99% rename from docs/models/operations/CreateAutenticationResponse.md rename to docs/models/operations/CreateAuthenticationResponse.md index 534a09e..ae972ce 100644 --- a/docs/models/operations/CreateAutenticationResponse.md +++ b/docs/models/operations/CreateAuthenticationResponse.md @@ -1,4 +1,4 @@ -# CreateAutenticationResponse +# CreateAuthenticationResponse ## Fields diff --git a/docs/models/shared/Code.md b/docs/models/shared/Code.md index 237dc6d..e91dfdc 100644 --- a/docs/models/shared/Code.md +++ b/docs/models/shared/Code.md @@ -14,6 +14,7 @@ A machine-readable code that describes the error. Possible values are: * `invalid_os_version` - The provided OS version is invalid. * `invalid_device_model` - The provided device model is invalid. * `invalid_device_id` - The provided device ID is invalid. + * `invalid_template_id` - The provided template ID is invalid. @@ -36,4 +37,5 @@ A machine-readable code that describes the error. Possible values are: | `INVALID_APP_VERSION` | invalid_app_version | | `INVALID_OS_VERSION` | invalid_os_version | | `INVALID_DEVICE_MODEL` | invalid_device_model | -| `INVALID_DEVICE_ID` | invalid_device_id | \ No newline at end of file +| `INVALID_DEVICE_ID` | invalid_device_id | +| `INVALID_TEMPLATE_ID` | invalid_template_id | \ No newline at end of file diff --git a/docs/models/shared/CreateAuthenticationRequest.md b/docs/models/shared/CreateAuthenticationRequest.md index 8c28d06..655eeeb 100644 --- a/docs/models/shared/CreateAuthenticationRequest.md +++ b/docs/models/shared/CreateAuthenticationRequest.md @@ -15,4 +15,5 @@ | `ip` | *String* | :heavy_minus_sign: | The IP address of the user's device. | | | `isReturningUser` | *Boolean* | :heavy_minus_sign: | Whether the user is a returning user on your app. | | | `osVersion` | *String* | :heavy_minus_sign: | The version of the user's device operating system. | | -| `phoneNumber` | *String* | :heavy_check_mark: | An E.164 formatted phone number to send the OTP to. | +1234567890 | \ No newline at end of file +| `phoneNumber` | *String* | :heavy_check_mark: | An E.164 formatted phone number to send the OTP to. | +1234567890 | +| `templateId` | *String* | :heavy_minus_sign: | The template id associated with the message content variant to be sent. | | \ No newline at end of file diff --git a/docs/models/shared/ErrorResponse.md b/docs/models/shared/ErrorResponse.md index e0f5b9d..076bcd5 100644 --- a/docs/models/shared/ErrorResponse.md +++ b/docs/models/shared/ErrorResponse.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `code` | [live.ding.dingSdk.models.shared.Code](../../models/shared/Code.md) | :heavy_minus_sign: | A machine-readable code that describes the error. Possible values are:
* `invalid_phone_number` - This is not a valid E.164 number.
* `internal_server_error` - An internal server error occurred.
* `bad_request` - The request was malformed.
* `account_invalid` - The provided customer UUID is invalid.
* `negative_balance` - You have a negative balance.
* `invalid_line` - Ding does not support this type of phone number.
* `unsupported_region` - Ding does not support this region yet.
* `invalid_auth_uuid` - The provided authentication UUID is invalid.
* `blocked_number` - The phone number is in the blocklist.
* `invalid_app_version` - The provided application version is invalid.
* `invalid_os_version` - The provided OS version is invalid.
* `invalid_device_model` - The provided device model is invalid.
* `invalid_device_id` - The provided device ID is invalid.
| invalid_phone_number | -| `docUrl` | *String* | :heavy_minus_sign: | A link to the documentation that describes the error. | https://docs.ding.live/api-reference/errors#invalid_phone_number | -| `message` | *String* | :heavy_minus_sign: | A human-readable message that describes the error. | +0 is not a valid phone number | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `code` | [live.ding.dingSdk.models.shared.Code](../../models/shared/Code.md) | :heavy_minus_sign: | A machine-readable code that describes the error. Possible values are:
* `invalid_phone_number` - This is not a valid E.164 number.
* `internal_server_error` - An internal server error occurred.
* `bad_request` - The request was malformed.
* `account_invalid` - The provided customer UUID is invalid.
* `negative_balance` - You have a negative balance.
* `invalid_line` - Ding does not support this type of phone number.
* `unsupported_region` - Ding does not support this region yet.
* `invalid_auth_uuid` - The provided authentication UUID is invalid.
* `blocked_number` - The phone number is in the blocklist.
* `invalid_app_version` - The provided application version is invalid.
* `invalid_os_version` - The provided OS version is invalid.
* `invalid_device_model` - The provided device model is invalid.
* `invalid_device_id` - The provided device ID is invalid.
* `invalid_template_id` - The provided template ID is invalid.
| invalid_phone_number | +| `docUrl` | *String* | :heavy_minus_sign: | A link to the documentation that describes the error. | https://docs.ding.live/api-reference/errors#invalid_phone_number | +| `message` | *String* | :heavy_minus_sign: | A human-readable message that describes the error. | +0 is not a valid phone number | \ No newline at end of file diff --git a/docs/sdks/otp/README.md b/docs/sdks/otp/README.md index eb147f4..763ec4f 100644 --- a/docs/sdks/otp/README.md +++ b/docs/sdks/otp/README.md @@ -8,7 +8,7 @@ Send OTP codes to your users using their phone numbers. ### Available Operations * [check](#check) - Check a code -* [createAutentication](#createautentication) - Send a code +* [createAuthentication](#createauthentication) - Send a code * [retry](#retry) - Perform a retry ## check @@ -64,7 +64,7 @@ public class Application { **[live.ding.dingSdk.models.operations.CheckResponse](../../models/operations/CheckResponse.md)** -## createAutentication +## createAuthentication Send a code @@ -74,7 +74,7 @@ Send a code package hello.world; import live.ding.dingSdk.Ding; -import live.ding.dingSdk.models.operations.CreateAutenticationResponse; +import live.ding.dingSdk.models.operations.CreateAuthenticationResponse; import live.ding.dingSdk.models.shared.CreateAuthenticationRequest; import live.ding.dingSdk.models.shared.DeviceType; import live.ding.dingSdk.models.shared.Security; @@ -90,21 +90,22 @@ public class Application { .build(); live.ding.dingSdk.models.shared.CreateAuthenticationRequest req = new CreateAuthenticationRequest( - "eae192ab-9e1e-4b21-b5b1-bfcb79a32fcc", + "c9f826e0-deca-41ec-871f-ecd6e8efeb46", "+1234567890"){{ appRealm = ""; appVersion = ""; - callbackUrl = "http://silly-credit.name"; + callbackUrl = "https://thin-television.name"; deviceId = ""; deviceModel = ""; - deviceType = DeviceType.WEB; - ip = "97.139.118.123"; + deviceType = DeviceType.ANDROID; + ip = "176.157.112.67"; isReturningUser = false; osVersion = ""; + templateId = ""; }}; - live.ding.dingSdk.models.operations.CreateAutenticationResponse res = sdk.otp.createAutentication(req); + live.ding.dingSdk.models.operations.CreateAuthenticationResponse res = sdk.otp.createAuthentication(req); if (res.createAuthenticationResponse != null) { // handle response @@ -125,7 +126,7 @@ public class Application { ### Response -**[live.ding.dingSdk.models.operations.CreateAutenticationResponse](../../models/operations/CreateAutenticationResponse.md)** +**[live.ding.dingSdk.models.operations.CreateAuthenticationResponse](../../models/operations/CreateAuthenticationResponse.md)** ## retry diff --git a/gen.yaml b/gen.yaml index 829db30..88a6fc3 100644 --- a/gen.yaml +++ b/gen.yaml @@ -7,10 +7,12 @@ generation: nameResolutionDec2023: false parameterOrderingFeb2024: false requestResponseComponentNamesFeb2024: false + auth: + oAuth2ClientCredentialsEnabled: false baseServerURL: "" flattenGlobalSecurity: true java: - version: 0.4.0 + version: 0.4.1 artifactID: dingSdk companyEmail: hello@ding.live companyName: Ding diff --git a/lib/build.gradle b/lib/build.gradle index 65fddb9..4d9201d 100644 --- a/lib/build.gradle +++ b/lib/build.gradle @@ -64,7 +64,7 @@ publishing { maven(MavenPublication) { groupId = 'live.ding' artifactId = 'dingSdk' - version = '0.4.0' + version = '0.4.1' from components.java diff --git a/lib/src/main/java/live/ding/dingSdk/Otp.java b/lib/src/main/java/live/ding/dingSdk/Otp.java index 1f3bdb8..6dbdc79 100644 --- a/lib/src/main/java/live/ding/dingSdk/Otp.java +++ b/lib/src/main/java/live/ding/dingSdk/Otp.java @@ -78,7 +78,7 @@ else if (httpRes.statusCode() == 400) { * @return the response from the API call * @throws Exception if the API call fails */ - public live.ding.dingSdk.models.operations.CreateAutenticationResponse createAutentication(live.ding.dingSdk.models.shared.CreateAuthenticationRequest request) throws Exception { + public live.ding.dingSdk.models.operations.CreateAuthenticationResponse createAuthentication(live.ding.dingSdk.models.shared.CreateAuthenticationRequest request) throws Exception { String baseUrl = this.sdkConfiguration.serverUrl; String url = live.ding.dingSdk.utils.Utils.generateURL(baseUrl, "/authentication"); @@ -97,7 +97,7 @@ public live.ding.dingSdk.models.operations.CreateAutenticationResponse createAut String contentType = httpRes.headers().firstValue("Content-Type").orElse("application/octet-stream"); - live.ding.dingSdk.models.operations.CreateAutenticationResponse res = new live.ding.dingSdk.models.operations.CreateAutenticationResponse(contentType, httpRes.statusCode(), httpRes) {{ + live.ding.dingSdk.models.operations.CreateAuthenticationResponse res = new live.ding.dingSdk.models.operations.CreateAuthenticationResponse(contentType, httpRes.statusCode(), httpRes) {{ createAuthenticationResponse = null; errorResponse = null; }}; diff --git a/lib/src/main/java/live/ding/dingSdk/SDKConfiguration.java b/lib/src/main/java/live/ding/dingSdk/SDKConfiguration.java index 66fb041..e02cbf0 100644 --- a/lib/src/main/java/live/ding/dingSdk/SDKConfiguration.java +++ b/lib/src/main/java/live/ding/dingSdk/SDKConfiguration.java @@ -15,9 +15,9 @@ class SDKConfiguration { public int serverIdx = 0; public String language = "java"; public String openapiDocVersion = "1.0.0"; - public String sdkVersion = "0.4.0"; - public String genVersion = "2.263.3"; - public String userAgent = "speakeasy-sdk/java 0.4.0 2.263.3 1.0.0 live.ding.dingSdk"; + public String sdkVersion = "0.4.1"; + public String genVersion = "2.279.1"; + public String userAgent = "speakeasy-sdk/java 0.4.1 2.279.1 1.0.0 live.ding.dingSdk"; } \ No newline at end of file diff --git a/lib/src/main/java/live/ding/dingSdk/models/operations/CreateAutenticationResponse.java b/lib/src/main/java/live/ding/dingSdk/models/operations/CreateAuthenticationResponse.java similarity index 62% rename from lib/src/main/java/live/ding/dingSdk/models/operations/CreateAutenticationResponse.java rename to lib/src/main/java/live/ding/dingSdk/models/operations/CreateAuthenticationResponse.java index 6f0feeb..5e486b4 100644 --- a/lib/src/main/java/live/ding/dingSdk/models/operations/CreateAutenticationResponse.java +++ b/lib/src/main/java/live/ding/dingSdk/models/operations/CreateAuthenticationResponse.java @@ -8,14 +8,14 @@ import java.net.http.HttpResponse; -public class CreateAutenticationResponse { +public class CreateAuthenticationResponse { /** * HTTP response content type for this operation */ public String contentType; - public CreateAutenticationResponse withContentType(String contentType) { + public CreateAuthenticationResponse withContentType(String contentType) { this.contentType = contentType; return this; } @@ -26,7 +26,7 @@ public CreateAutenticationResponse withContentType(String contentType) { public live.ding.dingSdk.models.shared.CreateAuthenticationResponse createAuthenticationResponse; - public CreateAutenticationResponse withCreateAuthenticationResponse(live.ding.dingSdk.models.shared.CreateAuthenticationResponse createAuthenticationResponse) { + public CreateAuthenticationResponse withCreateAuthenticationResponse(live.ding.dingSdk.models.shared.CreateAuthenticationResponse createAuthenticationResponse) { this.createAuthenticationResponse = createAuthenticationResponse; return this; } @@ -37,7 +37,7 @@ public CreateAutenticationResponse withCreateAuthenticationResponse(live.ding.di public live.ding.dingSdk.models.shared.ErrorResponse errorResponse; - public CreateAutenticationResponse withErrorResponse(live.ding.dingSdk.models.shared.ErrorResponse errorResponse) { + public CreateAuthenticationResponse withErrorResponse(live.ding.dingSdk.models.shared.ErrorResponse errorResponse) { this.errorResponse = errorResponse; return this; } @@ -48,7 +48,7 @@ public CreateAutenticationResponse withErrorResponse(live.ding.dingSdk.models.sh public Integer statusCode; - public CreateAutenticationResponse withStatusCode(Integer statusCode) { + public CreateAuthenticationResponse withStatusCode(Integer statusCode) { this.statusCode = statusCode; return this; } @@ -59,12 +59,12 @@ public CreateAutenticationResponse withStatusCode(Integer statusCode) { public HttpResponse rawResponse; - public CreateAutenticationResponse withRawResponse(HttpResponse rawResponse) { + public CreateAuthenticationResponse withRawResponse(HttpResponse rawResponse) { this.rawResponse = rawResponse; return this; } - public CreateAutenticationResponse(@JsonProperty("ContentType") String contentType, @JsonProperty("StatusCode") Integer statusCode, @JsonProperty("RawResponse") HttpResponse rawResponse) { + public CreateAuthenticationResponse(@JsonProperty("ContentType") String contentType, @JsonProperty("StatusCode") Integer statusCode, @JsonProperty("RawResponse") HttpResponse rawResponse) { this.contentType = contentType; this.statusCode = statusCode; this.rawResponse = rawResponse; diff --git a/lib/src/main/java/live/ding/dingSdk/models/shared/Code.java b/lib/src/main/java/live/ding/dingSdk/models/shared/Code.java index 4134eb6..c914584 100644 --- a/lib/src/main/java/live/ding/dingSdk/models/shared/Code.java +++ b/lib/src/main/java/live/ding/dingSdk/models/shared/Code.java @@ -21,6 +21,7 @@ * * `invalid_os_version` - The provided OS version is invalid. * * `invalid_device_model` - The provided device model is invalid. * * `invalid_device_id` - The provided device ID is invalid. + * * `invalid_template_id` - The provided template ID is invalid. * */ public enum Code { @@ -39,7 +40,8 @@ public enum Code { INVALID_APP_VERSION("invalid_app_version"), INVALID_OS_VERSION("invalid_os_version"), INVALID_DEVICE_MODEL("invalid_device_model"), - INVALID_DEVICE_ID("invalid_device_id"); + INVALID_DEVICE_ID("invalid_device_id"), + INVALID_TEMPLATE_ID("invalid_template_id"); @JsonValue public final String value; diff --git a/lib/src/main/java/live/ding/dingSdk/models/shared/CreateAuthenticationRequest.java b/lib/src/main/java/live/ding/dingSdk/models/shared/CreateAuthenticationRequest.java index 3b92641..90d1356 100644 --- a/lib/src/main/java/live/ding/dingSdk/models/shared/CreateAuthenticationRequest.java +++ b/lib/src/main/java/live/ding/dingSdk/models/shared/CreateAuthenticationRequest.java @@ -140,6 +140,18 @@ public CreateAuthenticationRequest withPhoneNumber(String phoneNumber) { return this; } + /** + * The template id associated with the message content variant to be sent. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("template_id") + public String templateId; + + public CreateAuthenticationRequest withTemplateId(String templateId) { + this.templateId = templateId; + return this; + } + public CreateAuthenticationRequest(@JsonProperty("customer_uuid") String customerUuid, @JsonProperty("phone_number") String phoneNumber) { this.customerUuid = customerUuid; this.phoneNumber = phoneNumber; diff --git a/lib/src/main/java/live/ding/dingSdk/models/shared/ErrorResponse.java b/lib/src/main/java/live/ding/dingSdk/models/shared/ErrorResponse.java index 486e66a..e4e0121 100644 --- a/lib/src/main/java/live/ding/dingSdk/models/shared/ErrorResponse.java +++ b/lib/src/main/java/live/ding/dingSdk/models/shared/ErrorResponse.java @@ -25,6 +25,7 @@ public class ErrorResponse { * * `invalid_os_version` - The provided OS version is invalid. * * `invalid_device_model` - The provided device model is invalid. * * `invalid_device_id` - The provided device ID is invalid. + * * `invalid_template_id` - The provided template ID is invalid. * */ @JsonInclude(Include.NON_ABSENT)