From 379f6dfc13f3993d030af48433d6103aa624f171 Mon Sep 17 00:00:00 2001
From: phil-warner <30385093+TheSMSWorks@users.noreply.github.com>
Date: Fri, 15 Dec 2023 11:28:05 +0000
Subject: [PATCH] Version 1.9.0
---
.openapi-generator/FILES | 38 +-
.openapi-generator/VERSION | 2 +-
README.md | 15 +-
api/openapi.yaml | 233 ++++++---
build.gradle | 8 +-
build.sbt | 2 +-
docs/BatchMessage.md | 1 +
docs/BatchMessagesApi.md | 4 +-
docs/Message.md | 1 +
docs/OTP.md | 1 +
docs/OneTimePasswordApi.md | 223 +++++++++
pom.xml | 21 +-
.../org/openapitools/client/ApiCallback.java | 4 +-
.../org/openapitools/client/ApiClient.java | 13 +-
.../org/openapitools/client/ApiException.java | 9 +-
.../org/openapitools/client/ApiResponse.java | 4 +-
.../openapitools/client/Configuration.java | 6 +-
.../client/GzipRequestInterceptor.java | 4 +-
.../java/org/openapitools/client/JSON.java | 5 +-
.../java/org/openapitools/client/Pair.java | 6 +-
.../client/ProgressRequestBody.java | 4 +-
.../client/ProgressResponseBody.java | 4 +-
.../org/openapitools/client/StringUtil.java | 6 +-
.../client/api/BatchMessagesApi.java | 16 +-
.../openapitools/client/api/CreditsApi.java | 5 +-
.../openapitools/client/api/MessagesApi.java | 5 +-
.../client/api/OneTimePasswordApi.java | 468 ++++++++++++++++++
.../org/openapitools/client/api/UtilsApi.java | 5 +-
.../openapitools/client/auth/ApiKeyAuth.java | 6 +-
.../client/auth/Authentication.java | 4 +-
.../client/auth/HttpBasicAuth.java | 4 +-
.../client/auth/HttpBearerAuth.java | 6 +-
.../client/model/AbstractOpenApiSchema.java | 9 +-
.../client/model/BatchMessage.java | 72 ++-
.../client/model/BatchMessageResponse.java | 38 +-
.../model/CancelledMessageResponse.java | 38 +-
.../client/model/CreditsResponse.java | 38 +-
.../client/model/DeletedMessageResponse.java | 38 +-
.../openapitools/client/model/ErrorModel.java | 38 +-
.../client/model/ExtendedErrorModel.java | 38 +-
.../openapitools/client/model/Message.java | 76 ++-
.../client/model/MessageMetadata.java | 36 +-
.../client/model/MessageResponse.java | 40 +-
.../model/MessageResponseFailurereason.java | 34 +-
.../openapitools/client/model/MetaData.java | 34 +-
.../org/openapitools/client/model/OTP.java | 64 ++-
.../client/model/OTPResponse.java | 34 +-
.../openapitools/client/model/OTPVerify.java | 34 +-
.../client/model/OTPVerifyResponse.java | 34 +-
.../org/openapitools/client/model/Query.java | 36 +-
.../client/model/QueryMetadata.java | 36 +-
.../client/model/ScheduledBatchResponse.java | 38 +-
.../client/model/ScheduledMessage.java | 36 +-
.../model/ScheduledMessageResponse.java | 38 +-
.../model/ScheduledMessagesResponse.java | 36 +-
.../ScheduledMessagesResponseMessage.java | 36 +-
.../client/model/SendMessageResponse.java | 38 +-
.../client/model/TestResponse.java | 38 +-
.../client/api/OneTimePasswordApiTest.java | 74 +++
59 files changed, 1559 insertions(+), 675 deletions(-)
create mode 100644 docs/OneTimePasswordApi.md
create mode 100644 src/main/java/org/openapitools/client/api/OneTimePasswordApi.java
create mode 100644 src/test/java/org/openapitools/client/api/OneTimePasswordApiTest.java
diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES
index 5fcc60c..81d33fd 100644
--- a/.openapi-generator/FILES
+++ b/.openapi-generator/FILES
@@ -14,7 +14,6 @@ docs/CreditsResponse.md
docs/DeletedMessageResponse.md
docs/ErrorModel.md
docs/ExtendedErrorModel.md
-docs/ExtendedErrorModelAllOf.md
docs/Message.md
docs/MessageMetadata.md
docs/MessageResponse.md
@@ -25,7 +24,7 @@ docs/OTP.md
docs/OTPResponse.md
docs/OTPVerify.md
docs/OTPVerifyResponse.md
-docs/OtpApi.md
+docs/OneTimePasswordApi.md
docs/Query.md
docs/QueryMetadata.md
docs/ScheduledBatchResponse.md
@@ -61,7 +60,7 @@ src/main/java/org/openapitools/client/StringUtil.java
src/main/java/org/openapitools/client/api/BatchMessagesApi.java
src/main/java/org/openapitools/client/api/CreditsApi.java
src/main/java/org/openapitools/client/api/MessagesApi.java
-src/main/java/org/openapitools/client/api/OtpApi.java
+src/main/java/org/openapitools/client/api/OneTimePasswordApi.java
src/main/java/org/openapitools/client/api/UtilsApi.java
src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
src/main/java/org/openapitools/client/auth/Authentication.java
@@ -75,7 +74,6 @@ src/main/java/org/openapitools/client/model/CreditsResponse.java
src/main/java/org/openapitools/client/model/DeletedMessageResponse.java
src/main/java/org/openapitools/client/model/ErrorModel.java
src/main/java/org/openapitools/client/model/ExtendedErrorModel.java
-src/main/java/org/openapitools/client/model/ExtendedErrorModelAllOf.java
src/main/java/org/openapitools/client/model/Message.java
src/main/java/org/openapitools/client/model/MessageMetadata.java
src/main/java/org/openapitools/client/model/MessageResponse.java
@@ -94,34 +92,4 @@ src/main/java/org/openapitools/client/model/ScheduledMessagesResponse.java
src/main/java/org/openapitools/client/model/ScheduledMessagesResponseMessage.java
src/main/java/org/openapitools/client/model/SendMessageResponse.java
src/main/java/org/openapitools/client/model/TestResponse.java
-src/test/java/org/openapitools/client/api/BatchMessagesApiTest.java
-src/test/java/org/openapitools/client/api/CreditsApiTest.java
-src/test/java/org/openapitools/client/api/MessagesApiTest.java
-src/test/java/org/openapitools/client/api/OtpApiTest.java
-src/test/java/org/openapitools/client/api/UtilsApiTest.java
-src/test/java/org/openapitools/client/model/BatchMessageResponseTest.java
-src/test/java/org/openapitools/client/model/BatchMessageTest.java
-src/test/java/org/openapitools/client/model/CancelledMessageResponseTest.java
-src/test/java/org/openapitools/client/model/CreditsResponseTest.java
-src/test/java/org/openapitools/client/model/DeletedMessageResponseTest.java
-src/test/java/org/openapitools/client/model/ErrorModelTest.java
-src/test/java/org/openapitools/client/model/ExtendedErrorModelAllOfTest.java
-src/test/java/org/openapitools/client/model/ExtendedErrorModelTest.java
-src/test/java/org/openapitools/client/model/MessageMetadataTest.java
-src/test/java/org/openapitools/client/model/MessageResponseFailurereasonTest.java
-src/test/java/org/openapitools/client/model/MessageResponseTest.java
-src/test/java/org/openapitools/client/model/MessageTest.java
-src/test/java/org/openapitools/client/model/MetaDataTest.java
-src/test/java/org/openapitools/client/model/OTPResponseTest.java
-src/test/java/org/openapitools/client/model/OTPTest.java
-src/test/java/org/openapitools/client/model/OTPVerifyResponseTest.java
-src/test/java/org/openapitools/client/model/OTPVerifyTest.java
-src/test/java/org/openapitools/client/model/QueryMetadataTest.java
-src/test/java/org/openapitools/client/model/QueryTest.java
-src/test/java/org/openapitools/client/model/ScheduledBatchResponseTest.java
-src/test/java/org/openapitools/client/model/ScheduledMessageResponseTest.java
-src/test/java/org/openapitools/client/model/ScheduledMessageTest.java
-src/test/java/org/openapitools/client/model/ScheduledMessagesResponseMessageTest.java
-src/test/java/org/openapitools/client/model/ScheduledMessagesResponseTest.java
-src/test/java/org/openapitools/client/model/SendMessageResponseTest.java
-src/test/java/org/openapitools/client/model/TestResponseTest.java
+src/test/java/org/openapitools/client/api/OneTimePasswordApiTest.java
diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION
index cd802a1..3769235 100644
--- a/.openapi-generator/VERSION
+++ b/.openapi-generator/VERSION
@@ -1 +1 @@
-6.6.0
\ No newline at end of file
+7.1.0
\ No newline at end of file
diff --git a/README.md b/README.md
index 130c87c..734631e 100644
--- a/README.md
+++ b/README.md
@@ -2,10 +2,11 @@
The SMS Works API
- API version: 1.9.0
- - Build date: 2023-07-14T11:38:52.349531+01:00[Europe/London]
+ - Build date: 2023-12-15T11:27:24.989260Z[Europe/London]
-The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
+ For more information, please visit [https://thesmsworks.co.uk/contact](https://thesmsworks.co.uk/contact)
*Automatically generated by the [OpenAPI Generator](https://openapi-generator.tech)*
@@ -99,7 +100,7 @@ public class Example {
//JWT.setApiKeyPrefix("Token");
BatchMessagesApi apiInstance = new BatchMessagesApi(defaultClient);
- List messages = Arrays.asList(); // List | An array of messages
+ Object messages = null; // Object | An array of messages
try {
BatchMessageResponse result = apiInstance.batchAnyPost(messages);
System.out.println(result);
@@ -137,8 +138,9 @@ Class | Method | HTTP request | Description
*MessagesApi* | [**messagesScheduleGet**](docs/MessagesApi.md#messagesScheduleGet) | **GET** /messages/schedule |
*MessagesApi* | [**messagesScheduleMessageidDelete**](docs/MessagesApi.md#messagesScheduleMessageidDelete) | **DELETE** /messages/schedule/{messageid} |
*MessagesApi* | [**sendFlashMessage**](docs/MessagesApi.md#sendFlashMessage) | **POST** /message/flash |
-*OtpApi* | [**otpSendPost**](docs/OtpApi.md#otpSendPost) | **POST** /otp/send |
-*OtpApi* | [**otpVerifyPost**](docs/OtpApi.md#otpVerifyPost) | **POST** /otp/verify |
+*OneTimePasswordApi* | [**otpMessageidGet**](docs/OneTimePasswordApi.md#otpMessageidGet) | **GET** /otp/{messageid} |
+*OneTimePasswordApi* | [**otpSendPost**](docs/OneTimePasswordApi.md#otpSendPost) | **POST** /otp/send |
+*OneTimePasswordApi* | [**otpVerifyPost**](docs/OneTimePasswordApi.md#otpVerifyPost) | **POST** /otp/verify |
*UtilsApi* | [**utilsErrorsErrorcodeGet**](docs/UtilsApi.md#utilsErrorsErrorcodeGet) | **GET** /utils/errors/{errorcode} |
*UtilsApi* | [**utilsTestGet**](docs/UtilsApi.md#utilsTestGet) | **GET** /utils/test |
@@ -152,7 +154,6 @@ Class | Method | HTTP request | Description
- [DeletedMessageResponse](docs/DeletedMessageResponse.md)
- [ErrorModel](docs/ErrorModel.md)
- [ExtendedErrorModel](docs/ExtendedErrorModel.md)
- - [ExtendedErrorModelAllOf](docs/ExtendedErrorModelAllOf.md)
- [Message](docs/Message.md)
- [MessageMetadata](docs/MessageMetadata.md)
- [MessageResponse](docs/MessageResponse.md)
@@ -192,5 +193,5 @@ It's recommended to create an instance of `ApiClient` per thread in a multithrea
## Author
-
+support@thesmsworks.co.uk
diff --git a/api/openapi.yaml b/api/openapi.yaml
index 7b7709f..b088c09 100644
--- a/api/openapi.yaml
+++ b/api/openapi.yaml
@@ -1,9 +1,18 @@
openapi: 3.0.1
info:
+ contact:
+ email: support@thesmsworks.co.uk
+ name: SMS Works Support
+ url: https://thesmsworks.co.uk/contact
description: "The SMS Works provides a low-cost, reliable SMS API for developers.\
- \ Pay only for delivered texts, all failed messages are refunded."
+ \ Pay only for delivered texts, all failed UK messages are refunded."
+ termsOfService: https://thesmsworks.co.uk/terms
title: The SMS Works API
version: 1.9.0
+ x-logo:
+ url: https://qa.thesmsworks.co.uk/docs/logo-transparent.png
+ altText: The SMS Works
+ href: https://thesmsworks.co.uk
servers:
- url: https://api.thesmsworks.co.uk/v1
paths:
@@ -39,7 +48,7 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-codegen-request-body-name: smsMessage
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -77,7 +86,7 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-codegen-request-body-name: smsMessage
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -110,7 +119,7 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-codegen-request-body-name: smsMessage
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -142,7 +151,7 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-codegen-request-body-name: query
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -173,7 +182,7 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-codegen-request-body-name: query
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -204,7 +213,7 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-codegen-request-body-name: query
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -229,18 +238,20 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-accepts: application/json;charset=UTF-8
/messages/{messageid}:
delete:
description: Delete the message with the mathcing messageid
parameters:
- description: The ID of the message you would like returned
+ explode: false
in: path
name: messageid
required: true
schema:
type: string
+ style: simple
responses:
"200":
content:
@@ -263,17 +274,19 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-accepts: application/json;charset=UTF-8
get:
description: Retrieve a logged message by the message ID
parameters:
- description: The ID of the message you would like returned
+ explode: false
in: path
name: messageid
required: true
schema:
type: string
+ style: simple
responses:
"200":
content:
@@ -296,18 +309,20 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-accepts: application/json;charset=UTF-8
/messages/schedule/{messageid}:
delete:
description: Cancels a scheduled SMS message
parameters:
- description: The ID of the message you would like returned
+ explode: false
in: path
name: messageid
required: true
schema:
type: string
+ style: simple
responses:
"200":
content:
@@ -324,7 +339,7 @@ paths:
security:
- JWT: []
tags:
- - messages
+ - Messages
x-accepts: application/json;charset=UTF-8
/batch/send:
post:
@@ -359,7 +374,7 @@ paths:
security:
- JWT: []
tags:
- - batch messages
+ - Batch Messages
x-codegen-request-body-name: smsMessage
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -396,7 +411,7 @@ paths:
security:
- JWT: []
tags:
- - batch messages
+ - Batch Messages
x-codegen-request-body-name: messages
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -405,11 +420,13 @@ paths:
description: Retrieve all messages in a batch with the given batch ID
parameters:
- description: The ID of the batch you would like returned
+ explode: false
in: path
name: batchid
required: true
schema:
type: string
+ style: simple
responses:
"200":
content:
@@ -434,7 +451,7 @@ paths:
security:
- JWT: []
tags:
- - batch messages
+ - Batch Messages
x-accepts: application/json;charset=UTF-8
/batch/schedule:
post:
@@ -469,7 +486,7 @@ paths:
security:
- JWT: []
tags:
- - batch messages
+ - Batch Messages
x-codegen-request-body-name: smsMessage
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
@@ -478,11 +495,13 @@ paths:
description: Cancels a scheduled SMS message
parameters:
- description: The ID of the batch you would like returned
+ explode: false
in: path
name: batchid
required: true
schema:
type: string
+ style: simple
responses:
"200":
content:
@@ -499,7 +518,7 @@ paths:
security:
- JWT: []
tags:
- - batch messages
+ - Batch Messages
x-accepts: application/json;charset=UTF-8
/otp/send:
post:
@@ -527,13 +546,13 @@ paths:
security:
- JWT: []
tags:
- - otp
+ - One-Time Password
x-codegen-request-body-name: otp
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
/otp/verify:
post:
- description: Verifies a One-Time Password
+ description: Generates and sends a One-Time Password
requestBody:
content:
application/json:
@@ -548,6 +567,12 @@ paths:
schema:
$ref: '#/components/schemas/OTPVerifyResponse'
description: Success
+ "404":
+ content:
+ application/json;charset=UTF-8:
+ schema:
+ $ref: '#/components/schemas/ErrorModel'
+ description: Error
default:
content:
application/json;charset=UTF-8:
@@ -557,10 +582,46 @@ paths:
security:
- JWT: []
tags:
- - otp
+ - One-Time Password
x-codegen-request-body-name: passcode
x-content-type: application/json
x-accepts: application/json;charset=UTF-8
+ /otp/{messageid}:
+ get:
+ description: Retrieve an OTP by it's message ID
+ parameters:
+ - description: The ID of the OTP you would like returned
+ explode: false
+ in: path
+ name: messageid
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/json;charset=UTF-8:
+ schema:
+ $ref: '#/components/schemas/OTPVerifyResponse'
+ description: Success
+ "404":
+ content:
+ application/json;charset=UTF-8:
+ schema:
+ $ref: '#/components/schemas/ErrorModel'
+ description: Error
+ default:
+ content:
+ application/json;charset=UTF-8:
+ schema:
+ $ref: '#/components/schemas/ErrorModel'
+ description: Error
+ security:
+ - JWT: []
+ tags:
+ - One-Time Password
+ x-accepts: application/json;charset=UTF-8
/credits/balance:
get:
description: Returns the number of credits currently available on the account
@@ -580,7 +641,7 @@ paths:
security:
- JWT: []
tags:
- - credits
+ - Credits
x-accepts: application/json;charset=UTF-8
/utils/test:
get:
@@ -601,7 +662,7 @@ paths:
security:
- JWT: []
tags:
- - utils
+ - Utils
x-accepts: application/json;charset=UTF-8
/utils/errors/{errorcode}:
get:
@@ -609,11 +670,13 @@ paths:
for designing code to react to errors when they occur for real.
parameters:
- description: The code of the error you would like returned
+ explode: false
in: path
name: errorcode
required: true
schema:
type: string
+ style: simple
responses:
default:
content:
@@ -624,7 +687,7 @@ paths:
security:
- JWT: []
tags:
- - utils
+ - Utils
x-accepts: application/json;charset=UTF-8
/swagger:
x-swagger-pipe: swagger_raw
@@ -641,12 +704,12 @@ components:
type: object
CreditsResponse:
example:
- credits: 180.0
+ credits: 180
properties:
credits:
description: The number of remaining credits on your SMS Works account.
Floating point number.
- example: 180.0
+ example: 180
type: number
required:
- credits
@@ -662,13 +725,14 @@ components:
value: myValue2
sender: YourCompany
destination: "447777777777"
+ ai: true
responseemail:
- my.email@mycompany.co.uk
- my.other.email@mycompany.co.uk
tag: SummerSpecial
- validity: 1440.0
+ validity: 1440
deliveryreporturl: http://your.domain.com/delivery/report/path
- ttl: 10.0
+ ttl: 10
content: Your super awesome message
properties:
sender:
@@ -712,7 +776,7 @@ components:
ttl:
description: The optional number of minutes before the delivery report is
deleted. Optional. Omit to prevent delivery report deletion. Integer.
- example: 10.0
+ example: 10
type: number
responseemail:
description: An optional list of email addresses to forward responses to
@@ -729,10 +793,16 @@ components:
validity:
description: The optional number of minutes to attempt delivery before the
message is marked as EXPIRED. Optional. The default is 2880 minutes. Integer.
- example: 1440.0
+ example: 1440
maximum: 2880
minimum: 1
type: number
+ ai:
+ description: Used to determine whether The SMS Works AI Optimiser should
+ be used in the event that the message is just longer than the 1 or 2 credit
+ boundary. This setting overrides the AI Optimiser configuration on your
+ SMS Works account.
+ type: boolean
required:
- content
- destination
@@ -752,9 +822,7 @@ components:
type: object
MessageArray:
description: An array of Messages
- items:
- $ref: '#/components/schemas/Message'
- type: array
+ type: object
BatchMessage:
description: SMS Message Batch
example:
@@ -764,10 +832,11 @@ components:
- "447777777777"
- "447777777778"
- "447777777779"
+ ai: true
tag: SummerSpecial
- validity: 1440.0
+ validity: 1440
deliveryreporturl: http://your.domain.com/delivery/report/path
- ttl: 10.0
+ ttl: 10
content: My super awesome batch message
properties:
sender:
@@ -809,15 +878,21 @@ components:
ttl:
description: The number of minutes before the delivery report is deleted.
Optional. Omit to prevent delivery report deletion. Integer.
- example: 10.0
+ example: 10
type: number
validity:
description: The optional number of minutes to attempt delivery before the
message is marked as EXPIRED. Optional. The default is 2880 minutes. Integer.
- example: 1440.0
+ example: 1440
maximum: 2880
minimum: 1
type: number
+ ai:
+ description: Used to determine whether The SMS Works AI Optimiser should
+ be used in the event that the message is just longer than the 1 or 2 credit
+ boundary. This setting overrides the AI Optimiser configuration on your
+ SMS Works account.
+ type: boolean
required:
- content
- destinations
@@ -865,7 +940,7 @@ components:
sender: MyCompany
destination: "07777777777"
content: Greetings on schedule!
- schedule: 2021-10-28T14:10:00+01:00
+ schedule: 2021-10-28T13:10:00.000Z
status: PROCESSED
properties:
status:
@@ -892,13 +967,13 @@ components:
value: myValue1
- key: myKey2
value: myValue2
- credits: 2.0
+ credits: 2
sender: YourCompany
unread: true
destination: "447777777777"
- limit: 1000.0
+ limit: 1000
from: Wed Jul 12 2017 20:26:28 GMT+0100 (BST)
- skip: 2000.0
+ skip: 2000
to: Wed Jul 19 2017 20:26:28 GMT+0100 (BST)
keyword: SKYWALKER
status: SENT
@@ -910,7 +985,7 @@ components:
type: string
credits:
description: The number of credits used on the message. Floating point number.
- example: 2.0
+ example: 2
type: number
destination:
description: The phone number of the recipient. Start UK numbers with 44
@@ -938,14 +1013,14 @@ components:
limit:
description: The maximum number of messages that you would like returned
in this call. The default is 1000.
- example: 1000.0
+ example: 1000
type: number
skip:
description: "The number of results you would like to ignore before returning\
\ messages. In combination with the 'limit' parameter his can be used\
\ to page results, so that you can deal with a limited number in your\
\ logic at each time."
- example: 2000.0
+ example: 2000
type: number
unread:
description: "In queries for incoming messages ('status' is 'INCOMING'),\
@@ -957,10 +1032,10 @@ components:
type: object
SendMessageResponse:
example:
- credits: 180.0
+ credits: 180
messageid: "123456789"
status: SENT
- creditsUsed: 2.0
+ creditsUsed: 2
properties:
messageid:
example: "123456789"
@@ -971,12 +1046,12 @@ components:
credits:
description: The number of remaining credits on your SMS Works account.
Floating point number.
- example: 180.0
+ example: 180
type: number
creditsUsed:
description: The number of credits used to send the message. Floating point
number.
- example: 2.0
+ example: 2
type: number
required:
- credits
@@ -1073,7 +1148,7 @@ components:
customerid: 0fca8c3c-6cbc-11e7-8154-a6006ad3dba0
modified: Wed Jul 19 2017 20:53:49 GMT+0100 (BST)
failurereason:
- code: 34.0
+ code: 34
permanent: false
details: Handset error
id: "123456789"
@@ -1149,7 +1224,8 @@ components:
cart_id: XYZ789
sender: YourCompany
destination: "7777777777"
- validity: 300.0
+ length: "{}"
+ validity: 300
passcode: "123456"
properties:
sender:
@@ -1162,6 +1238,11 @@ components:
description: The phone number of the recipient.
example: "7777777777"
type: string
+ length:
+ description: "The length of the generated passcode. The default length is\
+ \ 6 characters, which will apply if this parameter is omitted. All generated\
+ \ passcodes are numeric. Optional."
+ type: object
template:
description: "A template to use as the content for the message. You must\
\ include the '{{passcode}}' placeholder, which will be replaced by the\
@@ -1171,7 +1252,7 @@ components:
validity:
description: The length of time in seconds for which the generated passcode
should be valid. Optional.
- example: 300.0
+ example: 300
type: number
passcode:
description: A passcode you supply for use in the message template. This
@@ -1192,11 +1273,11 @@ components:
OTPResponse:
description: Response schema for the /otp/send method
example:
- credits: 561.0
- messageparts: 1.0
+ credits: 561
+ messageparts: 1
messageid: 52692416-ce9e-45ad-aa1e-14fcee8fa662
status: SENT
- creditsUsed: 1.0
+ creditsUsed: 1
properties:
messageid:
description: The messageid of the SMS used to send the OTP. Save this in
@@ -1209,15 +1290,15 @@ components:
type: string
credits:
description: The credit balance on your account
- example: 561.0
+ example: 561
type: number
creditsUsed:
description: The number of credits used to send this message
- example: 1.0
+ example: 1
type: number
messageparts:
description: The number of message parts used to send this message
- example: 1.0
+ example: 1
type: number
type: object
OTPVerify:
@@ -1240,8 +1321,8 @@ components:
created: Tue Apr 25 2023 16:47:00 GMT+0100 (British Summer Time)
destination: "447777000000"
modified: Tue Apr 25 2023 16:49:20 GMT+0100 (British Summer Time)
- validity: 300.0
- passcode: 123456.0
+ validity: 300
+ passcode: 123456
status: VERIFIED
properties:
destination:
@@ -1255,12 +1336,12 @@ components:
type: string
passcode:
description: The passcode used.
- example: 123456.0
+ example: 123456
type: number
validity:
description: The length of time in seconds for which the generated passcode
is valid.
- example: 300.0
+ example: 300
type: number
metadata:
description: "A JSON object storing data supplied when this passcode was\
@@ -1294,7 +1375,18 @@ components:
ExtendedErrorModel:
allOf:
- $ref: '#/components/schemas/ErrorModel'
- - $ref: '#/components/schemas/ExtendedErrorModel_allOf'
+ - properties:
+ errorCode:
+ description: Numeric code used to identify the error. Integer.
+ type: number
+ status:
+ type: string
+ permanent:
+ type: boolean
+ required:
+ - errorCode
+ - status
+ type: object
Message_metadata:
example:
- key: myKey1
@@ -1310,7 +1402,7 @@ components:
sender: MyCompany
destination: "07777777777"
content: Greetings on schedule!
- schedule: 2021-10-28T14:10:00+01:00
+ schedule: 2021-10-28T13:10:00.000Z
properties:
schema:
$ref: '#/components/schemas/ScheduledMessage'
@@ -1329,13 +1421,13 @@ components:
type: object
MessageResponse_failurereason:
example:
- code: 34.0
+ code: 34
permanent: false
details: Handset error
properties:
code:
description: Numeric code that defines the error. Integer.
- example: 34.0
+ example: 34
type: number
details:
example: Handset error
@@ -1344,24 +1436,9 @@ components:
example: false
type: boolean
type: object
- ExtendedErrorModel_allOf:
- properties:
- errorCode:
- description: Numeric code used to identify the error. Integer.
- type: number
- status:
- type: string
- permanent:
- type: boolean
- required:
- - errorCode
- - status
- type: object
- example: null
securitySchemes:
JWT:
in: header
name: Authorization
type: apiKey
-x-original-swagger-version: "2.0"
diff --git a/build.gradle b/build.gradle
index 7d94a4a..e5e6e81 100644
--- a/build.gradle
+++ b/build.gradle
@@ -62,9 +62,9 @@ if(hasProperty('target') && target == 'android') {
def task = project.tasks.create "jar${variant.name.capitalize()}", Jar
task.description = "Create jar artifact for ${variant.name}"
task.dependsOn variant.javaCompile
- task.from variant.javaCompile.destinationDir
- task.destinationDir = project.file("${project.buildDir}/outputs/jar")
- task.archiveName = "${project.name}-${variant.baseName}-${version}.jar"
+ task.from variant.javaCompile.destinationDirectory
+ task.destinationDirectory = project.file("${project.buildDir}/outputs/jar")
+ task.archiveFileName = "${project.name}-${variant.baseName}-${version}.jar"
artifacts.add('archives', task)
}
}
@@ -111,7 +111,7 @@ dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
implementation 'com.google.code.gson:gson:2.9.1'
- implementation 'io.gsonfire:gson-fire:1.8.5'
+ implementation 'io.gsonfire:gson-fire:1.9.0'
implementation 'javax.ws.rs:jsr311-api:1.1.1'
implementation 'javax.ws.rs:javax.ws.rs-api:2.1.1'
implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
diff --git a/build.sbt b/build.sbt
index 3057e81..8327c3b 100644
--- a/build.sbt
+++ b/build.sbt
@@ -17,7 +17,7 @@ lazy val root = (project in file(".")).
"javax.ws.rs" % "jsr311-api" % "1.1.1",
"javax.ws.rs" % "javax.ws.rs-api" % "2.1.1",
"org.openapitools" % "jackson-databind-nullable" % "0.2.6",
- "io.gsonfire" % "gson-fire" % "1.8.5" % "compile",
+ "io.gsonfire" % "gson-fire" % "1.9.0" % "compile",
"jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile",
"com.google.code.findbugs" % "jsr305" % "3.0.2" % "compile",
"jakarta.annotation" % "jakarta.annotation-api" % "1.3.5" % "compile",
diff --git a/docs/BatchMessage.md b/docs/BatchMessage.md
index 361ef81..a95e103 100644
--- a/docs/BatchMessage.md
+++ b/docs/BatchMessage.md
@@ -16,6 +16,7 @@ SMS Message Batch
|**tag** | **String** | An identifying label for the message, which you can use to filter and report on messages you've sent later. Ideal for campaigns. A maximum of 280 characters. | [optional] |
|**ttl** | **BigDecimal** | The number of minutes before the delivery report is deleted. Optional. Omit to prevent delivery report deletion. Integer. | [optional] |
|**validity** | **BigDecimal** | The optional number of minutes to attempt delivery before the message is marked as EXPIRED. Optional. The default is 2880 minutes. Integer. | [optional] |
+|**ai** | **Boolean** | Used to determine whether The SMS Works AI Optimiser should be used in the event that the message is just longer than the 1 or 2 credit boundary. This setting overrides the AI Optimiser configuration on your SMS Works account. | [optional] |
diff --git a/docs/BatchMessagesApi.md b/docs/BatchMessagesApi.md
index eb7ace5..8609fb8 100644
--- a/docs/BatchMessagesApi.md
+++ b/docs/BatchMessagesApi.md
@@ -41,7 +41,7 @@ public class Example {
//JWT.setApiKeyPrefix("Token");
BatchMessagesApi apiInstance = new BatchMessagesApi(defaultClient);
- List messages = Arrays.asList(); // List | An array of messages
+ Object messages = null; // Object | An array of messages
try {
BatchMessageResponse result = apiInstance.batchAnyPost(messages);
System.out.println(result);
@@ -60,7 +60,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
-| **messages** | [**List<Message>**](Message.md)| An array of messages | |
+| **messages** | **Object**| An array of messages | |
### Return type
diff --git a/docs/Message.md b/docs/Message.md
index ac3d177..b8d4954 100644
--- a/docs/Message.md
+++ b/docs/Message.md
@@ -18,6 +18,7 @@ SMS message object
|**responseemail** | **List<String>** | An optional list of email addresses to forward responses to this specific message to. An SMS Works Reply Number is required to use this feature. | [optional] |
|**metadata** | [**MessageMetadata**](MessageMetadata.md) | | [optional] |
|**validity** | **BigDecimal** | The optional number of minutes to attempt delivery before the message is marked as EXPIRED. Optional. The default is 2880 minutes. Integer. | [optional] |
+|**ai** | **Boolean** | Used to determine whether The SMS Works AI Optimiser should be used in the event that the message is just longer than the 1 or 2 credit boundary. This setting overrides the AI Optimiser configuration on your SMS Works account. | [optional] |
diff --git a/docs/OTP.md b/docs/OTP.md
index 56a5a17..ece84d1 100644
--- a/docs/OTP.md
+++ b/docs/OTP.md
@@ -10,6 +10,7 @@ Parameters for the generation and sending of One-Time Passwords
|------------ | ------------- | ------------- | -------------|
|**sender** | **String** | The sender of the message. Should be no longer than 11 characters for alphanumeric or 15 characters for numeric sender ID's. No spaces or special characters. | [optional] |
|**destination** | **String** | The phone number of the recipient. | [optional] |
+|**length** | **Object** | The length of the generated passcode. The default length is 6 characters, which will apply if this parameter is omitted. All generated passcodes are numeric. Optional. | [optional] |
|**template** | **String** | A template to use as the content for the message. You must include the '{{passcode}}' placeholder, which will be replaced by the generated passcode when the message is sent. Optional. | [optional] |
|**validity** | **BigDecimal** | The length of time in seconds for which the generated passcode should be valid. Optional. | [optional] |
|**passcode** | **String** | A passcode you supply for use in the message template. This will be stored on the OTP record in our system for later verification. Optional. | [optional] |
diff --git a/docs/OneTimePasswordApi.md b/docs/OneTimePasswordApi.md
new file mode 100644
index 0000000..165cfa4
--- /dev/null
+++ b/docs/OneTimePasswordApi.md
@@ -0,0 +1,223 @@
+# OneTimePasswordApi
+
+All URIs are relative to *https://api.thesmsworks.co.uk/v1*
+
+| Method | HTTP request | Description |
+|------------- | ------------- | -------------|
+| [**otpMessageidGet**](OneTimePasswordApi.md#otpMessageidGet) | **GET** /otp/{messageid} | |
+| [**otpSendPost**](OneTimePasswordApi.md#otpSendPost) | **POST** /otp/send | |
+| [**otpVerifyPost**](OneTimePasswordApi.md#otpVerifyPost) | **POST** /otp/verify | |
+
+
+
+# **otpMessageidGet**
+> OTPVerifyResponse otpMessageidGet(messageid)
+
+
+
+Retrieve an OTP by it's message ID
+
+### Example
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.OneTimePasswordApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.thesmsworks.co.uk/v1");
+
+ // Configure API key authorization: JWT
+ ApiKeyAuth JWT = (ApiKeyAuth) defaultClient.getAuthentication("JWT");
+ JWT.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //JWT.setApiKeyPrefix("Token");
+
+ OneTimePasswordApi apiInstance = new OneTimePasswordApi(defaultClient);
+ String messageid = "messageid_example"; // String | The ID of the OTP you would like returned
+ try {
+ OTPVerifyResponse result = apiInstance.otpMessageidGet(messageid);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling OneTimePasswordApi#otpMessageidGet");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **messageid** | **String**| The ID of the OTP you would like returned | |
+
+### Return type
+
+[**OTPVerifyResponse**](OTPVerifyResponse.md)
+
+### Authorization
+
+[JWT](../README.md#JWT)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json;charset=UTF-8
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **404** | Error | - |
+| **0** | Error | - |
+
+
+# **otpSendPost**
+> OTPResponse otpSendPost(otp)
+
+
+
+Generates and sends a One-Time Password
+
+### Example
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.OneTimePasswordApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.thesmsworks.co.uk/v1");
+
+ // Configure API key authorization: JWT
+ ApiKeyAuth JWT = (ApiKeyAuth) defaultClient.getAuthentication("JWT");
+ JWT.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //JWT.setApiKeyPrefix("Token");
+
+ OneTimePasswordApi apiInstance = new OneTimePasswordApi(defaultClient);
+ OTP otp = new OTP(); // OTP | OTP properties
+ try {
+ OTPResponse result = apiInstance.otpSendPost(otp);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling OneTimePasswordApi#otpSendPost");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **otp** | [**OTP**](OTP.md)| OTP properties | |
+
+### Return type
+
+[**OTPResponse**](OTPResponse.md)
+
+### Authorization
+
+[JWT](../README.md#JWT)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json;charset=UTF-8
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **201** | Success | - |
+| **0** | Error | - |
+
+
+# **otpVerifyPost**
+> OTPVerifyResponse otpVerifyPost(passcode)
+
+
+
+Generates and sends a One-Time Password
+
+### Example
+```java
+// Import classes:
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.auth.*;
+import org.openapitools.client.models.*;
+import org.openapitools.client.api.OneTimePasswordApi;
+
+public class Example {
+ public static void main(String[] args) {
+ ApiClient defaultClient = Configuration.getDefaultApiClient();
+ defaultClient.setBasePath("https://api.thesmsworks.co.uk/v1");
+
+ // Configure API key authorization: JWT
+ ApiKeyAuth JWT = (ApiKeyAuth) defaultClient.getAuthentication("JWT");
+ JWT.setApiKey("YOUR API KEY");
+ // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
+ //JWT.setApiKeyPrefix("Token");
+
+ OneTimePasswordApi apiInstance = new OneTimePasswordApi(defaultClient);
+ OTPVerify passcode = new OTPVerify(); // OTPVerify | One-Time Password
+ try {
+ OTPVerifyResponse result = apiInstance.otpVerifyPost(passcode);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling OneTimePasswordApi#otpVerifyPost");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **passcode** | [**OTPVerify**](OTPVerify.md)| One-Time Password | |
+
+### Return type
+
+[**OTPVerifyResponse**](OTPVerifyResponse.md)
+
+### Authorization
+
+[JWT](../README.md#JWT)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json;charset=UTF-8
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+| **404** | Error | - |
+| **0** | Error | - |
+
diff --git a/pom.xml b/pom.xml
index d19364e..48f2574 100644
--- a/pom.xml
+++ b/pom.xml
@@ -300,7 +300,6 @@
jackson-databind-nullable
${jackson-databind-nullable-version}
-
javax.ws.rs
jsr311-api
@@ -324,27 +323,19 @@
${junit-platform-runner.version}
test
-
- org.mockito
- mockito-core
- ${mockito-core-version}
- test
-
1.8
${java.version}
${java.version}
- 1.8.5
- 1.6.6
- 4.10.0
- 2.9.1
- 3.12.0
+ 1.9.0
+ 4.11.0
+ 2.10.1
+ 3.13.0
0.2.6
1.3.5
- 5.9.1
- 1.9.1
- 3.12.4
+ 5.10.0
+ 1.10.0
2.1.1
1.1.1
UTF-8
diff --git a/src/main/java/org/openapitools/client/ApiCallback.java b/src/main/java/org/openapitools/client/ApiCallback.java
index 5255f7d..f8c3aef 100644
--- a/src/main/java/org/openapitools/client/ApiCallback.java
+++ b/src/main/java/org/openapitools/client/ApiCallback.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/org/openapitools/client/ApiClient.java b/src/main/java/org/openapitools/client/ApiClient.java
index 3dbd906..1c6e4bd 100644
--- a/src/main/java/org/openapitools/client/ApiClient.java
+++ b/src/main/java/org/openapitools/client/ApiClient.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -1168,12 +1168,15 @@ public Request buildRequest(String baseUrl, String path, String method, ListApiException class.
*/
@SuppressWarnings("serial")
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ApiException extends Exception {
private int code = 0;
private Map> responseHeaders = null;
private String responseBody = null;
-
+
/**
* Constructor for ApiException.
*/
diff --git a/src/main/java/org/openapitools/client/ApiResponse.java b/src/main/java/org/openapitools/client/ApiResponse.java
index c399ac1..be3d0bc 100644
--- a/src/main/java/org/openapitools/client/ApiResponse.java
+++ b/src/main/java/org/openapitools/client/ApiResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/org/openapitools/client/Configuration.java b/src/main/java/org/openapitools/client/Configuration.java
index c897daa..7f777fc 100644
--- a/src/main/java/org/openapitools/client/Configuration.java
+++ b/src/main/java/org/openapitools/client/Configuration.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -13,7 +13,7 @@
package org.openapitools.client;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class Configuration {
public static final String VERSION = "1.9.0";
diff --git a/src/main/java/org/openapitools/client/GzipRequestInterceptor.java b/src/main/java/org/openapitools/client/GzipRequestInterceptor.java
index 1fc2c2c..a3d301e 100644
--- a/src/main/java/org/openapitools/client/GzipRequestInterceptor.java
+++ b/src/main/java/org/openapitools/client/GzipRequestInterceptor.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/org/openapitools/client/JSON.java b/src/main/java/org/openapitools/client/JSON.java
index 34cbd63..c695edb 100644
--- a/src/main/java/org/openapitools/client/JSON.java
+++ b/src/main/java/org/openapitools/client/JSON.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -100,7 +100,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.DeletedMessageResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ErrorModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExtendedErrorModel.CustomTypeAdapterFactory());
- gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.ExtendedErrorModelAllOf.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Message.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MessageMetadata.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.MessageResponse.CustomTypeAdapterFactory());
diff --git a/src/main/java/org/openapitools/client/Pair.java b/src/main/java/org/openapitools/client/Pair.java
index 44d346b..e7e32c3 100644
--- a/src/main/java/org/openapitools/client/Pair.java
+++ b/src/main/java/org/openapitools/client/Pair.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -13,7 +13,7 @@
package org.openapitools.client;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class Pair {
private String name = "";
private String value = "";
diff --git a/src/main/java/org/openapitools/client/ProgressRequestBody.java b/src/main/java/org/openapitools/client/ProgressRequestBody.java
index 023fe00..1f5fae0 100644
--- a/src/main/java/org/openapitools/client/ProgressRequestBody.java
+++ b/src/main/java/org/openapitools/client/ProgressRequestBody.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/org/openapitools/client/ProgressResponseBody.java b/src/main/java/org/openapitools/client/ProgressResponseBody.java
index 15dc6e6..ca72a35 100644
--- a/src/main/java/org/openapitools/client/ProgressResponseBody.java
+++ b/src/main/java/org/openapitools/client/ProgressResponseBody.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/org/openapitools/client/StringUtil.java b/src/main/java/org/openapitools/client/StringUtil.java
index 65d62d7..0411365 100644
--- a/src/main/java/org/openapitools/client/StringUtil.java
+++ b/src/main/java/org/openapitools/client/StringUtil.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -16,7 +16,7 @@
import java.util.Collection;
import java.util.Iterator;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
diff --git a/src/main/java/org/openapitools/client/api/BatchMessagesApi.java b/src/main/java/org/openapitools/client/api/BatchMessagesApi.java
index cfc0508..7211e53 100644
--- a/src/main/java/org/openapitools/client/api/BatchMessagesApi.java
+++ b/src/main/java/org/openapitools/client/api/BatchMessagesApi.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -32,7 +32,6 @@
import org.openapitools.client.model.CancelledMessageResponse;
import org.openapitools.client.model.ErrorModel;
import org.openapitools.client.model.ExtendedErrorModel;
-import org.openapitools.client.model.Message;
import org.openapitools.client.model.MessageResponse;
import org.openapitools.client.model.ScheduledBatchResponse;
@@ -41,7 +40,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.ws.rs.core.GenericType;
public class BatchMessagesApi {
private ApiClient localVarApiClient;
@@ -94,7 +92,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
0 | Error | - |
*/
- public okhttp3.Call batchAnyPostCall(List messages, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call batchAnyPostCall(Object messages, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
@@ -140,7 +138,7 @@ public okhttp3.Call batchAnyPostCall(List messages, final ApiCallback _
}
@SuppressWarnings("rawtypes")
- private okhttp3.Call batchAnyPostValidateBeforeCall(List messages, final ApiCallback _callback) throws ApiException {
+ private okhttp3.Call batchAnyPostValidateBeforeCall(Object messages, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'messages' is set
if (messages == null) {
throw new ApiException("Missing the required parameter 'messages' when calling batchAnyPost(Async)");
@@ -164,7 +162,7 @@ private okhttp3.Call batchAnyPostValidateBeforeCall(List messages, fina
0 | Error | - |
*/
- public BatchMessageResponse batchAnyPost(List messages) throws ApiException {
+ public BatchMessageResponse batchAnyPost(Object messages) throws ApiException {
ApiResponse localVarResp = batchAnyPostWithHttpInfo(messages);
return localVarResp.getData();
}
@@ -183,7 +181,7 @@ public BatchMessageResponse batchAnyPost(List messages) throws ApiExcep
0 | Error | - |
*/
- public ApiResponse batchAnyPostWithHttpInfo(List messages) throws ApiException {
+ public ApiResponse batchAnyPostWithHttpInfo(Object messages) throws ApiException {
okhttp3.Call localVarCall = batchAnyPostValidateBeforeCall(messages, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
@@ -204,7 +202,7 @@ public ApiResponse batchAnyPostWithHttpInfo(List
0 | Error | - |
*/
- public okhttp3.Call batchAnyPostAsync(List messages, final ApiCallback _callback) throws ApiException {
+ public okhttp3.Call batchAnyPostAsync(Object messages, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = batchAnyPostValidateBeforeCall(messages, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
diff --git a/src/main/java/org/openapitools/client/api/CreditsApi.java b/src/main/java/org/openapitools/client/api/CreditsApi.java
index e4663d2..a5ba8ac 100644
--- a/src/main/java/org/openapitools/client/api/CreditsApi.java
+++ b/src/main/java/org/openapitools/client/api/CreditsApi.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -35,7 +35,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.ws.rs.core.GenericType;
public class CreditsApi {
private ApiClient localVarApiClient;
diff --git a/src/main/java/org/openapitools/client/api/MessagesApi.java b/src/main/java/org/openapitools/client/api/MessagesApi.java
index 77c3715..bfec12a 100644
--- a/src/main/java/org/openapitools/client/api/MessagesApi.java
+++ b/src/main/java/org/openapitools/client/api/MessagesApi.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -43,7 +43,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.ws.rs.core.GenericType;
public class MessagesApi {
private ApiClient localVarApiClient;
diff --git a/src/main/java/org/openapitools/client/api/OneTimePasswordApi.java b/src/main/java/org/openapitools/client/api/OneTimePasswordApi.java
new file mode 100644
index 0000000..8ab3b8b
--- /dev/null
+++ b/src/main/java/org/openapitools/client/api/OneTimePasswordApi.java
@@ -0,0 +1,468 @@
+/*
+ * The SMS Works API
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
+ *
+ * The version of the OpenAPI document: 1.9.0
+ * Contact: support@thesmsworks.co.uk
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiCallback;
+import org.openapitools.client.ApiClient;
+import org.openapitools.client.ApiException;
+import org.openapitools.client.ApiResponse;
+import org.openapitools.client.Configuration;
+import org.openapitools.client.Pair;
+import org.openapitools.client.ProgressRequestBody;
+import org.openapitools.client.ProgressResponseBody;
+
+import com.google.gson.reflect.TypeToken;
+
+import java.io.IOException;
+
+
+import org.openapitools.client.model.ErrorModel;
+import org.openapitools.client.model.OTP;
+import org.openapitools.client.model.OTPResponse;
+import org.openapitools.client.model.OTPVerify;
+import org.openapitools.client.model.OTPVerifyResponse;
+
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class OneTimePasswordApi {
+ private ApiClient localVarApiClient;
+ private int localHostIndex;
+ private String localCustomBaseUrl;
+
+ public OneTimePasswordApi() {
+ this(Configuration.getDefaultApiClient());
+ }
+
+ public OneTimePasswordApi(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public ApiClient getApiClient() {
+ return localVarApiClient;
+ }
+
+ public void setApiClient(ApiClient apiClient) {
+ this.localVarApiClient = apiClient;
+ }
+
+ public int getHostIndex() {
+ return localHostIndex;
+ }
+
+ public void setHostIndex(int hostIndex) {
+ this.localHostIndex = hostIndex;
+ }
+
+ public String getCustomBaseUrl() {
+ return localCustomBaseUrl;
+ }
+
+ public void setCustomBaseUrl(String customBaseUrl) {
+ this.localCustomBaseUrl = customBaseUrl;
+ }
+
+ /**
+ * Build call for otpMessageidGet
+ * @param messageid The ID of the OTP you would like returned (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public okhttp3.Call otpMessageidGetCall(String messageid, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/otp/{messageid}"
+ .replace("{" + "messageid" + "}", localVarApiClient.escapeString(messageid.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json;charset=UTF-8"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "JWT" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call otpMessageidGetValidateBeforeCall(String messageid, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'messageid' is set
+ if (messageid == null) {
+ throw new ApiException("Missing the required parameter 'messageid' when calling otpMessageidGet(Async)");
+ }
+
+ return otpMessageidGetCall(messageid, _callback);
+
+ }
+
+ /**
+ *
+ * Retrieve an OTP by it's message ID
+ * @param messageid The ID of the OTP you would like returned (required)
+ * @return OTPVerifyResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public OTPVerifyResponse otpMessageidGet(String messageid) throws ApiException {
+ ApiResponse localVarResp = otpMessageidGetWithHttpInfo(messageid);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Retrieve an OTP by it's message ID
+ * @param messageid The ID of the OTP you would like returned (required)
+ * @return ApiResponse<OTPVerifyResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public ApiResponse otpMessageidGetWithHttpInfo(String messageid) throws ApiException {
+ okhttp3.Call localVarCall = otpMessageidGetValidateBeforeCall(messageid, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Retrieve an OTP by it's message ID
+ * @param messageid The ID of the OTP you would like returned (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public okhttp3.Call otpMessageidGetAsync(String messageid, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = otpMessageidGetValidateBeforeCall(messageid, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for otpSendPost
+ * @param otp OTP properties (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | Success | - |
+ 0 | Error | - |
+
+ */
+ public okhttp3.Call otpSendPostCall(OTP otp, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = otp;
+
+ // create path and map variables
+ String localVarPath = "/otp/send";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json;charset=UTF-8"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "JWT" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call otpSendPostValidateBeforeCall(OTP otp, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'otp' is set
+ if (otp == null) {
+ throw new ApiException("Missing the required parameter 'otp' when calling otpSendPost(Async)");
+ }
+
+ return otpSendPostCall(otp, _callback);
+
+ }
+
+ /**
+ *
+ * Generates and sends a One-Time Password
+ * @param otp OTP properties (required)
+ * @return OTPResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | Success | - |
+ 0 | Error | - |
+
+ */
+ public OTPResponse otpSendPost(OTP otp) throws ApiException {
+ ApiResponse localVarResp = otpSendPostWithHttpInfo(otp);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Generates and sends a One-Time Password
+ * @param otp OTP properties (required)
+ * @return ApiResponse<OTPResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | Success | - |
+ 0 | Error | - |
+
+ */
+ public ApiResponse otpSendPostWithHttpInfo(OTP otp) throws ApiException {
+ okhttp3.Call localVarCall = otpSendPostValidateBeforeCall(otp, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Generates and sends a One-Time Password
+ * @param otp OTP properties (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 201 | Success | - |
+ 0 | Error | - |
+
+ */
+ public okhttp3.Call otpSendPostAsync(OTP otp, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = otpSendPostValidateBeforeCall(otp, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+ /**
+ * Build call for otpVerifyPost
+ * @param passcode One-Time Password (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public okhttp3.Call otpVerifyPostCall(OTPVerify passcode, final ApiCallback _callback) throws ApiException {
+ String basePath = null;
+ // Operation Servers
+ String[] localBasePaths = new String[] { };
+
+ // Determine Base Path to Use
+ if (localCustomBaseUrl != null){
+ basePath = localCustomBaseUrl;
+ } else if ( localBasePaths.length > 0 ) {
+ basePath = localBasePaths[localHostIndex];
+ } else {
+ basePath = null;
+ }
+
+ Object localVarPostBody = passcode;
+
+ // create path and map variables
+ String localVarPath = "/otp/verify";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json;charset=UTF-8"
+ };
+ final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) {
+ localVarHeaderParams.put("Accept", localVarAccept);
+ }
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
+ if (localVarContentType != null) {
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+ }
+
+ String[] localVarAuthNames = new String[] { "JWT" };
+ return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private okhttp3.Call otpVerifyPostValidateBeforeCall(OTPVerify passcode, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'passcode' is set
+ if (passcode == null) {
+ throw new ApiException("Missing the required parameter 'passcode' when calling otpVerifyPost(Async)");
+ }
+
+ return otpVerifyPostCall(passcode, _callback);
+
+ }
+
+ /**
+ *
+ * Generates and sends a One-Time Password
+ * @param passcode One-Time Password (required)
+ * @return OTPVerifyResponse
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public OTPVerifyResponse otpVerifyPost(OTPVerify passcode) throws ApiException {
+ ApiResponse localVarResp = otpVerifyPostWithHttpInfo(passcode);
+ return localVarResp.getData();
+ }
+
+ /**
+ *
+ * Generates and sends a One-Time Password
+ * @param passcode One-Time Password (required)
+ * @return ApiResponse<OTPVerifyResponse>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public ApiResponse otpVerifyPostWithHttpInfo(OTPVerify passcode) throws ApiException {
+ okhttp3.Call localVarCall = otpVerifyPostValidateBeforeCall(passcode, null);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * (asynchronously)
+ * Generates and sends a One-Time Password
+ * @param passcode One-Time Password (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Status Code | Description | Response Headers |
+ 200 | Success | - |
+ 404 | Error | - |
+ 0 | Error | - |
+
+ */
+ public okhttp3.Call otpVerifyPostAsync(OTPVerify passcode, final ApiCallback _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = otpVerifyPostValidateBeforeCall(passcode, _callback);
+ Type localVarReturnType = new TypeToken(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
+}
diff --git a/src/main/java/org/openapitools/client/api/UtilsApi.java b/src/main/java/org/openapitools/client/api/UtilsApi.java
index e184b75..1b475c7 100644
--- a/src/main/java/org/openapitools/client/api/UtilsApi.java
+++ b/src/main/java/org/openapitools/client/api/UtilsApi.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -36,7 +36,6 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import javax.ws.rs.core.GenericType;
public class UtilsApi {
private ApiClient localVarApiClient;
diff --git a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java b/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
index cb9dc9c..39ef915 100644
--- a/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
+++ b/src/main/java/org/openapitools/client/auth/ApiKeyAuth.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -20,7 +20,7 @@
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;
diff --git a/src/main/java/org/openapitools/client/auth/Authentication.java b/src/main/java/org/openapitools/client/auth/Authentication.java
index bcd0b0a..f9a79fa 100644
--- a/src/main/java/org/openapitools/client/auth/Authentication.java
+++ b/src/main/java/org/openapitools/client/auth/Authentication.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java b/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
index c1155f2..b64ae2c 100644
--- a/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
+++ b/src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
diff --git a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java b/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
index fc46453..d2a0db4 100644
--- a/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
+++ b/src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -20,7 +20,7 @@
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class HttpBearerAuth implements Authentication {
private final String scheme;
private String bearerToken;
diff --git a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
index 8a25236..e73b63e 100644
--- a/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
+++ b/src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -17,14 +17,13 @@
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
-import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
/**
* Abstract class for oneOf,anyOf schemas defined in OpenAPI spec
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public abstract class AbstractOpenApiSchema {
// store the actual instance of the schema/object
@@ -46,7 +45,7 @@ public AbstractOpenApiSchema(String schemaType, Boolean isNullable) {
*
* @return an instance of the actual schema/object
*/
- public abstract Map getSchemas();
+ public abstract Map> getSchemas();
/**
* Get the actual instance
diff --git a/src/main/java/org/openapitools/client/model/BatchMessage.java b/src/main/java/org/openapitools/client/model/BatchMessage.java
index 13cf852..c26081c 100644
--- a/src/main/java/org/openapitools/client/model/BatchMessage.java
+++ b/src/main/java/org/openapitools/client/model/BatchMessage.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -23,6 +22,7 @@
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import com.google.gson.Gson;
@@ -45,7 +45,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -53,7 +52,7 @@
/**
* SMS Message Batch
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class BatchMessage {
public static final String SERIALIZED_NAME_SENDER = "sender";
@SerializedName(SERIALIZED_NAME_SENDER)
@@ -87,6 +86,10 @@ public class BatchMessage {
@SerializedName(SERIALIZED_NAME_VALIDITY)
private BigDecimal validity;
+ public static final String SERIALIZED_NAME_AI = "ai";
+ @SerializedName(SERIALIZED_NAME_AI)
+ private Boolean ai;
+
public BatchMessage() {
}
@@ -254,7 +257,7 @@ public BatchMessage validity(BigDecimal validity) {
/**
* The optional number of minutes to attempt delivery before the message is marked as EXPIRED. Optional. The default is 2880 minutes. Integer.
* minimum: 1
- * maximum: 2.88E+3
+ * maximum: 2880
* @return validity
**/
@javax.annotation.Nullable
@@ -268,6 +271,27 @@ public void setValidity(BigDecimal validity) {
}
+ public BatchMessage ai(Boolean ai) {
+
+ this.ai = ai;
+ return this;
+ }
+
+ /**
+ * Used to determine whether The SMS Works AI Optimiser should be used in the event that the message is just longer than the 1 or 2 credit boundary. This setting overrides the AI Optimiser configuration on your SMS Works account.
+ * @return ai
+ **/
+ @javax.annotation.Nullable
+ public Boolean getAi() {
+ return ai;
+ }
+
+
+ public void setAi(Boolean ai) {
+ this.ai = ai;
+ }
+
+
@Override
public boolean equals(Object o) {
@@ -285,12 +309,13 @@ public boolean equals(Object o) {
Objects.equals(this.schedule, batchMessage.schedule) &&
Objects.equals(this.tag, batchMessage.tag) &&
Objects.equals(this.ttl, batchMessage.ttl) &&
- Objects.equals(this.validity, batchMessage.validity);
+ Objects.equals(this.validity, batchMessage.validity) &&
+ Objects.equals(this.ai, batchMessage.ai);
}
@Override
public int hashCode() {
- return Objects.hash(sender, destinations, content, deliveryreporturl, schedule, tag, ttl, validity);
+ return Objects.hash(sender, destinations, content, deliveryreporturl, schedule, tag, ttl, validity, ai);
}
@Override
@@ -305,6 +330,7 @@ public String toString() {
sb.append(" tag: ").append(toIndentedString(tag)).append("\n");
sb.append(" ttl: ").append(toIndentedString(ttl)).append("\n");
sb.append(" validity: ").append(toIndentedString(validity)).append("\n");
+ sb.append(" ai: ").append(toIndentedString(ai)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -335,6 +361,7 @@ private String toIndentedString(Object o) {
openapiFields.add("tag");
openapiFields.add("ttl");
openapiFields.add("validity");
+ openapiFields.add("ai");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -344,32 +371,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to BatchMessage
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to BatchMessage
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!BatchMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!BatchMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in BatchMessage is not found in the empty JSON string", BatchMessage.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!BatchMessage.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BatchMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BatchMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : BatchMessage.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("sender").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `sender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sender").toString()));
}
@@ -413,9 +441,9 @@ public void write(JsonWriter out, BatchMessage value) throws IOException {
@Override
public BatchMessage read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/BatchMessageResponse.java b/src/main/java/org/openapitools/client/model/BatchMessageResponse.java
index 8773ef8..6a3e304 100644
--- a/src/main/java/org/openapitools/client/model/BatchMessageResponse.java
+++ b/src/main/java/org/openapitools/client/model/BatchMessageResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* BatchMessageResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class BatchMessageResponse {
public static final String SERIALIZED_NAME_BATCHID = "batchid";
@SerializedName(SERIALIZED_NAME_BATCHID)
@@ -162,32 +161,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to BatchMessageResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to BatchMessageResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!BatchMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!BatchMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in BatchMessageResponse is not found in the empty JSON string", BatchMessageResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!BatchMessageResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BatchMessageResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `BatchMessageResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : BatchMessageResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("batchid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `batchid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("batchid").toString()));
}
@@ -216,9 +216,9 @@ public void write(JsonWriter out, BatchMessageResponse value) throws IOException
@Override
public BatchMessageResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/CancelledMessageResponse.java b/src/main/java/org/openapitools/client/model/CancelledMessageResponse.java
index 01cf59e..2b04763 100644
--- a/src/main/java/org/openapitools/client/model/CancelledMessageResponse.java
+++ b/src/main/java/org/openapitools/client/model/CancelledMessageResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* CancelledMessageResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class CancelledMessageResponse {
public static final String SERIALIZED_NAME_MESSAGEID = "messageid";
@SerializedName(SERIALIZED_NAME_MESSAGEID)
@@ -162,32 +161,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to CancelledMessageResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to CancelledMessageResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!CancelledMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!CancelledMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in CancelledMessageResponse is not found in the empty JSON string", CancelledMessageResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!CancelledMessageResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelledMessageResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CancelledMessageResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : CancelledMessageResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("messageid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `messageid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageid").toString()));
}
@@ -216,9 +216,9 @@ public void write(JsonWriter out, CancelledMessageResponse value) throws IOExcep
@Override
public CancelledMessageResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/CreditsResponse.java b/src/main/java/org/openapitools/client/model/CreditsResponse.java
index a4eeba8..09cb75f 100644
--- a/src/main/java/org/openapitools/client/model/CreditsResponse.java
+++ b/src/main/java/org/openapitools/client/model/CreditsResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* CreditsResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class CreditsResponse {
public static final String SERIALIZED_NAME_CREDITS = "credits";
@SerializedName(SERIALIZED_NAME_CREDITS)
@@ -134,32 +133,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to CreditsResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to CreditsResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!CreditsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!CreditsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in CreditsResponse is not found in the empty JSON string", CreditsResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!CreditsResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreditsResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `CreditsResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : CreditsResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
}
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
@@ -182,9 +182,9 @@ public void write(JsonWriter out, CreditsResponse value) throws IOException {
@Override
public CreditsResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/DeletedMessageResponse.java b/src/main/java/org/openapitools/client/model/DeletedMessageResponse.java
index ace543e..3d09427 100644
--- a/src/main/java/org/openapitools/client/model/DeletedMessageResponse.java
+++ b/src/main/java/org/openapitools/client/model/DeletedMessageResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* DeletedMessageResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class DeletedMessageResponse {
public static final String SERIALIZED_NAME_MESSAGEID = "messageid";
@SerializedName(SERIALIZED_NAME_MESSAGEID)
@@ -162,32 +161,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to DeletedMessageResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to DeletedMessageResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!DeletedMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!DeletedMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in DeletedMessageResponse is not found in the empty JSON string", DeletedMessageResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!DeletedMessageResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeletedMessageResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `DeletedMessageResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : DeletedMessageResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("messageid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `messageid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageid").toString()));
}
@@ -216,9 +216,9 @@ public void write(JsonWriter out, DeletedMessageResponse value) throws IOExcepti
@Override
public DeletedMessageResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/ErrorModel.java b/src/main/java/org/openapitools/client/model/ErrorModel.java
index d476c76..a7734bf 100644
--- a/src/main/java/org/openapitools/client/model/ErrorModel.java
+++ b/src/main/java/org/openapitools/client/model/ErrorModel.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* ErrorModel
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ErrorModel {
public static final String SERIALIZED_NAME_MESSAGE = "message";
@SerializedName(SERIALIZED_NAME_MESSAGE)
@@ -133,32 +132,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to ErrorModel
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ErrorModel
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!ErrorModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ErrorModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in ErrorModel is not found in the empty JSON string", ErrorModel.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!ErrorModel.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorModel` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ErrorModel` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : ErrorModel.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("message").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString()));
}
@@ -184,9 +184,9 @@ public void write(JsonWriter out, ErrorModel value) throws IOException {
@Override
public ErrorModel read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/ExtendedErrorModel.java b/src/main/java/org/openapitools/client/model/ExtendedErrorModel.java
index 1a7f7c8..3949343 100644
--- a/src/main/java/org/openapitools/client/model/ExtendedErrorModel.java
+++ b/src/main/java/org/openapitools/client/model/ExtendedErrorModel.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* ExtendedErrorModel
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ExtendedErrorModel {
public static final String SERIALIZED_NAME_MESSAGE = "message";
@SerializedName(SERIALIZED_NAME_MESSAGE)
@@ -220,32 +219,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to ExtendedErrorModel
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ExtendedErrorModel
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!ExtendedErrorModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ExtendedErrorModel.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in ExtendedErrorModel is not found in the empty JSON string", ExtendedErrorModel.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!ExtendedErrorModel.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExtendedErrorModel` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ExtendedErrorModel` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : ExtendedErrorModel.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("message").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString()));
}
@@ -274,9 +274,9 @@ public void write(JsonWriter out, ExtendedErrorModel value) throws IOException {
@Override
public ExtendedErrorModel read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/Message.java b/src/main/java/org/openapitools/client/model/Message.java
index 9243383..f9604af 100644
--- a/src/main/java/org/openapitools/client/model/Message.java
+++ b/src/main/java/org/openapitools/client/model/Message.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -23,6 +22,7 @@
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.MessageMetadata;
@@ -46,7 +46,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -54,7 +53,7 @@
/**
* SMS message object
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class Message {
public static final String SERIALIZED_NAME_SENDER = "sender";
@SerializedName(SERIALIZED_NAME_SENDER)
@@ -96,6 +95,10 @@ public class Message {
@SerializedName(SERIALIZED_NAME_VALIDITY)
private BigDecimal validity;
+ public static final String SERIALIZED_NAME_AI = "ai";
+ @SerializedName(SERIALIZED_NAME_AI)
+ private Boolean ai;
+
public Message() {
}
@@ -305,7 +308,7 @@ public Message validity(BigDecimal validity) {
/**
* The optional number of minutes to attempt delivery before the message is marked as EXPIRED. Optional. The default is 2880 minutes. Integer.
* minimum: 1
- * maximum: 2.88E+3
+ * maximum: 2880
* @return validity
**/
@javax.annotation.Nullable
@@ -319,6 +322,27 @@ public void setValidity(BigDecimal validity) {
}
+ public Message ai(Boolean ai) {
+
+ this.ai = ai;
+ return this;
+ }
+
+ /**
+ * Used to determine whether The SMS Works AI Optimiser should be used in the event that the message is just longer than the 1 or 2 credit boundary. This setting overrides the AI Optimiser configuration on your SMS Works account.
+ * @return ai
+ **/
+ @javax.annotation.Nullable
+ public Boolean getAi() {
+ return ai;
+ }
+
+
+ public void setAi(Boolean ai) {
+ this.ai = ai;
+ }
+
+
@Override
public boolean equals(Object o) {
@@ -338,12 +362,13 @@ public boolean equals(Object o) {
Objects.equals(this.ttl, message.ttl) &&
Objects.equals(this.responseemail, message.responseemail) &&
Objects.equals(this.metadata, message.metadata) &&
- Objects.equals(this.validity, message.validity);
+ Objects.equals(this.validity, message.validity) &&
+ Objects.equals(this.ai, message.ai);
}
@Override
public int hashCode() {
- return Objects.hash(sender, destination, content, deliveryreporturl, schedule, tag, ttl, responseemail, metadata, validity);
+ return Objects.hash(sender, destination, content, deliveryreporturl, schedule, tag, ttl, responseemail, metadata, validity, ai);
}
@Override
@@ -360,6 +385,7 @@ public String toString() {
sb.append(" responseemail: ").append(toIndentedString(responseemail)).append("\n");
sb.append(" metadata: ").append(toIndentedString(metadata)).append("\n");
sb.append(" validity: ").append(toIndentedString(validity)).append("\n");
+ sb.append(" ai: ").append(toIndentedString(ai)).append("\n");
sb.append("}");
return sb.toString();
}
@@ -392,6 +418,7 @@ private String toIndentedString(Object o) {
openapiFields.add("responseemail");
openapiFields.add("metadata");
openapiFields.add("validity");
+ openapiFields.add("ai");
// a set of required properties/fields (JSON key names)
openapiRequiredFields = new HashSet();
@@ -401,32 +428,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to Message
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to Message
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!Message.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!Message.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in Message is not found in the empty JSON string", Message.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!Message.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Message` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Message` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : Message.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("sender").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `sender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sender").toString()));
}
@@ -446,12 +474,12 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
throw new IllegalArgumentException(String.format("Expected the field `tag` to be a primitive type in the JSON string but got `%s`", jsonObj.get("tag").toString()));
}
// ensure the optional json data is an array if present
- if (jsonObj.get("responseemail") != null && !jsonObj.get("responseemail").isJsonArray()) {
+ if (jsonObj.get("responseemail") != null && !jsonObj.get("responseemail").isJsonNull() && !jsonObj.get("responseemail").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `responseemail` to be an array in the JSON string but got `%s`", jsonObj.get("responseemail").toString()));
}
// validate the optional field `metadata`
if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) {
- MessageMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata"));
+ MessageMetadata.validateJsonElement(jsonObj.get("metadata"));
}
}
@@ -475,9 +503,9 @@ public void write(JsonWriter out, Message value) throws IOException {
@Override
public Message read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/MessageMetadata.java b/src/main/java/org/openapitools/client/model/MessageMetadata.java
index 8bec1a5..46bfc07 100644
--- a/src/main/java/org/openapitools/client/model/MessageMetadata.java
+++ b/src/main/java/org/openapitools/client/model/MessageMetadata.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import org.openapitools.client.model.MetaData;
import com.google.gson.Gson;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* MessageMetadata
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class MessageMetadata {
public static final String SERIALIZED_NAME_SCHEMA = "schema";
@SerializedName(SERIALIZED_NAME_SCHEMA)
@@ -133,28 +132,29 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to MessageMetadata
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to MessageMetadata
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!MessageMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!MessageMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in MessageMetadata is not found in the empty JSON string", MessageMetadata.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!MessageMetadata.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
// validate the optional field `schema`
if (jsonObj.get("schema") != null && !jsonObj.get("schema").isJsonNull()) {
- MetaData.validateJsonObject(jsonObj.getAsJsonObject("schema"));
+ MetaData.validateJsonElement(jsonObj.get("schema"));
}
}
@@ -178,9 +178,9 @@ public void write(JsonWriter out, MessageMetadata value) throws IOException {
@Override
public MessageMetadata read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/MessageResponse.java b/src/main/java/org/openapitools/client/model/MessageResponse.java
index c9b8c51..57f7d8d 100644
--- a/src/main/java/org/openapitools/client/model/MessageResponse.java
+++ b/src/main/java/org/openapitools/client/model/MessageResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import org.openapitools.client.model.MessageResponseFailurereason;
import com.google.gson.Gson;
@@ -44,7 +44,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -52,7 +51,7 @@
/**
* MessageResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class MessageResponse {
public static final String SERIALIZED_NAME_BATCHID = "batchid";
@SerializedName(SERIALIZED_NAME_BATCHID)
@@ -564,32 +563,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to MessageResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to MessageResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!MessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!MessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in MessageResponse is not found in the empty JSON string", MessageResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!MessageResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : MessageResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("batchid") != null && !jsonObj.get("batchid").isJsonNull()) && !jsonObj.get("batchid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `batchid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("batchid").toString()));
}
@@ -607,7 +607,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
}
// validate the optional field `failurereason`
if (jsonObj.get("failurereason") != null && !jsonObj.get("failurereason").isJsonNull()) {
- MessageResponseFailurereason.validateJsonObject(jsonObj.getAsJsonObject("failurereason"));
+ MessageResponseFailurereason.validateJsonElement(jsonObj.get("failurereason"));
}
if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
@@ -658,9 +658,9 @@ public void write(JsonWriter out, MessageResponse value) throws IOException {
@Override
public MessageResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/MessageResponseFailurereason.java b/src/main/java/org/openapitools/client/model/MessageResponseFailurereason.java
index 0cbfec5..5e2a914 100644
--- a/src/main/java/org/openapitools/client/model/MessageResponseFailurereason.java
+++ b/src/main/java/org/openapitools/client/model/MessageResponseFailurereason.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* MessageResponseFailurereason
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class MessageResponseFailurereason {
public static final String SERIALIZED_NAME_CODE = "code";
@SerializedName(SERIALIZED_NAME_CODE)
@@ -189,25 +188,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to MessageResponseFailurereason
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to MessageResponseFailurereason
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!MessageResponseFailurereason.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!MessageResponseFailurereason.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in MessageResponseFailurereason is not found in the empty JSON string", MessageResponseFailurereason.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!MessageResponseFailurereason.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageResponseFailurereason` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MessageResponseFailurereason` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("details") != null && !jsonObj.get("details").isJsonNull()) && !jsonObj.get("details").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `details` to be a primitive type in the JSON string but got `%s`", jsonObj.get("details").toString()));
}
@@ -233,9 +233,9 @@ public void write(JsonWriter out, MessageResponseFailurereason value) throws IOE
@Override
public MessageResponseFailurereason read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/MetaData.java b/src/main/java/org/openapitools/client/model/MetaData.java
index 06a4762..1d4f05b 100644
--- a/src/main/java/org/openapitools/client/model/MetaData.java
+++ b/src/main/java/org/openapitools/client/model/MetaData.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* Key/value pair that will be returned to you in the API call response.
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class MetaData {
public static final String SERIALIZED_NAME_KEY = "key";
@SerializedName(SERIALIZED_NAME_KEY)
@@ -160,25 +159,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to MetaData
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to MetaData
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!MetaData.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!MetaData.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in MetaData is not found in the empty JSON string", MetaData.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!MetaData.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetaData` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `MetaData` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("key") != null && !jsonObj.get("key").isJsonNull()) && !jsonObj.get("key").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `key` to be a primitive type in the JSON string but got `%s`", jsonObj.get("key").toString()));
}
@@ -207,9 +207,9 @@ public void write(JsonWriter out, MetaData value) throws IOException {
@Override
public MetaData read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/OTP.java b/src/main/java/org/openapitools/client/model/OTP.java
index 7a776ca..836784e 100644
--- a/src/main/java/org/openapitools/client/model/OTP.java
+++ b/src/main/java/org/openapitools/client/model/OTP.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* Parameters for the generation and sending of One-Time Passwords
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class OTP {
public static final String SERIALIZED_NAME_SENDER = "sender";
@SerializedName(SERIALIZED_NAME_SENDER)
@@ -61,6 +60,10 @@ public class OTP {
@SerializedName(SERIALIZED_NAME_DESTINATION)
private String destination;
+ public static final String SERIALIZED_NAME_LENGTH = "length";
+ @SerializedName(SERIALIZED_NAME_LENGTH)
+ private Object length;
+
public static final String SERIALIZED_NAME_TEMPLATE = "template";
@SerializedName(SERIALIZED_NAME_TEMPLATE)
private String template;
@@ -122,6 +125,27 @@ public void setDestination(String destination) {
}
+ public OTP length(Object length) {
+
+ this.length = length;
+ return this;
+ }
+
+ /**
+ * The length of the generated passcode. The default length is 6 characters, which will apply if this parameter is omitted. All generated passcodes are numeric. Optional.
+ * @return length
+ **/
+ @javax.annotation.Nullable
+ public Object getLength() {
+ return length;
+ }
+
+
+ public void setLength(Object length) {
+ this.length = length;
+ }
+
+
public OTP template(String template) {
this.template = template;
@@ -218,6 +242,7 @@ public boolean equals(Object o) {
OTP OTP = (OTP) o;
return Objects.equals(this.sender, OTP.sender) &&
Objects.equals(this.destination, OTP.destination) &&
+ Objects.equals(this.length, OTP.length) &&
Objects.equals(this.template, OTP.template) &&
Objects.equals(this.validity, OTP.validity) &&
Objects.equals(this.passcode, OTP.passcode) &&
@@ -226,7 +251,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(sender, destination, template, validity, passcode, metadata);
+ return Objects.hash(sender, destination, length, template, validity, passcode, metadata);
}
@Override
@@ -235,6 +260,7 @@ public String toString() {
sb.append("class OTP {\n");
sb.append(" sender: ").append(toIndentedString(sender)).append("\n");
sb.append(" destination: ").append(toIndentedString(destination)).append("\n");
+ sb.append(" length: ").append(toIndentedString(length)).append("\n");
sb.append(" template: ").append(toIndentedString(template)).append("\n");
sb.append(" validity: ").append(toIndentedString(validity)).append("\n");
sb.append(" passcode: ").append(toIndentedString(passcode)).append("\n");
@@ -263,6 +289,7 @@ private String toIndentedString(Object o) {
openapiFields = new HashSet();
openapiFields.add("sender");
openapiFields.add("destination");
+ openapiFields.add("length");
openapiFields.add("template");
openapiFields.add("validity");
openapiFields.add("passcode");
@@ -273,25 +300,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to OTP
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to OTP
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!OTP.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!OTP.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in OTP is not found in the empty JSON string", OTP.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!OTP.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTP` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTP` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("sender") != null && !jsonObj.get("sender").isJsonNull()) && !jsonObj.get("sender").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `sender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sender").toString()));
}
@@ -326,9 +354,9 @@ public void write(JsonWriter out, OTP value) throws IOException {
@Override
public OTP read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/OTPResponse.java b/src/main/java/org/openapitools/client/model/OTPResponse.java
index 816fd8e..75ef25a 100644
--- a/src/main/java/org/openapitools/client/model/OTPResponse.java
+++ b/src/main/java/org/openapitools/client/model/OTPResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* Response schema for the /otp/send method
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class OTPResponse {
public static final String SERIALIZED_NAME_MESSAGEID = "messageid";
@SerializedName(SERIALIZED_NAME_MESSAGEID)
@@ -245,25 +244,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to OTPResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to OTPResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!OTPResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!OTPResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in OTPResponse is not found in the empty JSON string", OTPResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!OTPResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTPResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTPResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("messageid") != null && !jsonObj.get("messageid").isJsonNull()) && !jsonObj.get("messageid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `messageid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageid").toString()));
}
@@ -292,9 +292,9 @@ public void write(JsonWriter out, OTPResponse value) throws IOException {
@Override
public OTPResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/OTPVerify.java b/src/main/java/org/openapitools/client/model/OTPVerify.java
index a26e43f..e001f52 100644
--- a/src/main/java/org/openapitools/client/model/OTPVerify.java
+++ b/src/main/java/org/openapitools/client/model/OTPVerify.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* Schema for the /oyp/verify method
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class OTPVerify {
public static final String SERIALIZED_NAME_PASSCODE = "passcode";
@SerializedName(SERIALIZED_NAME_PASSCODE)
@@ -132,25 +131,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to OTPVerify
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to OTPVerify
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!OTPVerify.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!OTPVerify.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in OTPVerify is not found in the empty JSON string", OTPVerify.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!OTPVerify.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTPVerify` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTPVerify` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("passcode") != null && !jsonObj.get("passcode").isJsonNull()) && !jsonObj.get("passcode").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `passcode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("passcode").toString()));
}
@@ -176,9 +176,9 @@ public void write(JsonWriter out, OTPVerify value) throws IOException {
@Override
public OTPVerify read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/OTPVerifyResponse.java b/src/main/java/org/openapitools/client/model/OTPVerifyResponse.java
index 5735375..c339c6b 100644
--- a/src/main/java/org/openapitools/client/model/OTPVerifyResponse.java
+++ b/src/main/java/org/openapitools/client/model/OTPVerifyResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* Response schema for the /otp/verify method
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class OTPVerifyResponse {
public static final String SERIALIZED_NAME_DESTINATION = "destination";
@SerializedName(SERIALIZED_NAME_DESTINATION)
@@ -329,25 +328,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to OTPVerifyResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to OTPVerifyResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!OTPVerifyResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!OTPVerifyResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in OTPVerifyResponse is not found in the empty JSON string", OTPVerifyResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!OTPVerifyResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTPVerifyResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `OTPVerifyResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("destination") != null && !jsonObj.get("destination").isJsonNull()) && !jsonObj.get("destination").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `destination` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destination").toString()));
}
@@ -385,9 +385,9 @@ public void write(JsonWriter out, OTPVerifyResponse value) throws IOException {
@Override
public OTPVerifyResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/Query.java b/src/main/java/org/openapitools/client/model/Query.java
index b2eb8ae..b73dcd2 100644
--- a/src/main/java/org/openapitools/client/model/Query.java
+++ b/src/main/java/org/openapitools/client/model/Query.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import org.openapitools.client.model.QueryMetadata;
import com.google.gson.Gson;
@@ -44,7 +44,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -52,7 +51,7 @@
/**
* search parameters for querying the message database
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class Query {
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
@@ -414,25 +413,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to Query
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to Query
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!Query.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!Query.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in Query is not found in the empty JSON string", Query.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!Query.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Query` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `Query` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString()));
}
@@ -453,7 +453,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
}
// validate the optional field `metadata`
if (jsonObj.get("metadata") != null && !jsonObj.get("metadata").isJsonNull()) {
- QueryMetadata.validateJsonObject(jsonObj.getAsJsonObject("metadata"));
+ QueryMetadata.validateJsonElement(jsonObj.get("metadata"));
}
}
@@ -477,9 +477,9 @@ public void write(JsonWriter out, Query value) throws IOException {
@Override
public Query read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/QueryMetadata.java b/src/main/java/org/openapitools/client/model/QueryMetadata.java
index a975d6c..8c9bb67 100644
--- a/src/main/java/org/openapitools/client/model/QueryMetadata.java
+++ b/src/main/java/org/openapitools/client/model/QueryMetadata.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import org.openapitools.client.model.MetaData;
import com.google.gson.Gson;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* An array of objects containing metadata key/value pairs that have been saved on messages.
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class QueryMetadata {
public static final String SERIALIZED_NAME_SCHEMA = "schema";
@SerializedName(SERIALIZED_NAME_SCHEMA)
@@ -133,28 +132,29 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to QueryMetadata
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to QueryMetadata
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!QueryMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!QueryMetadata.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in QueryMetadata is not found in the empty JSON string", QueryMetadata.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!QueryMetadata.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QueryMetadata` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `QueryMetadata` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
// validate the optional field `schema`
if (jsonObj.get("schema") != null && !jsonObj.get("schema").isJsonNull()) {
- MetaData.validateJsonObject(jsonObj.getAsJsonObject("schema"));
+ MetaData.validateJsonElement(jsonObj.get("schema"));
}
}
@@ -178,9 +178,9 @@ public void write(JsonWriter out, QueryMetadata value) throws IOException {
@Override
public QueryMetadata read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/ScheduledBatchResponse.java b/src/main/java/org/openapitools/client/model/ScheduledBatchResponse.java
index 0eed445..ef883a7 100644
--- a/src/main/java/org/openapitools/client/model/ScheduledBatchResponse.java
+++ b/src/main/java/org/openapitools/client/model/ScheduledBatchResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* ScheduledBatchResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ScheduledBatchResponse {
public static final String SERIALIZED_NAME_BATCHID = "batchid";
@SerializedName(SERIALIZED_NAME_BATCHID)
@@ -162,32 +161,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to ScheduledBatchResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ScheduledBatchResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!ScheduledBatchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ScheduledBatchResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in ScheduledBatchResponse is not found in the empty JSON string", ScheduledBatchResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!ScheduledBatchResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledBatchResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledBatchResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : ScheduledBatchResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("batchid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `batchid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("batchid").toString()));
}
@@ -216,9 +216,9 @@ public void write(JsonWriter out, ScheduledBatchResponse value) throws IOExcepti
@Override
public ScheduledBatchResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/ScheduledMessage.java b/src/main/java/org/openapitools/client/model/ScheduledMessage.java
index d3ae4ef..941b2fa 100644
--- a/src/main/java/org/openapitools/client/model/ScheduledMessage.java
+++ b/src/main/java/org/openapitools/client/model/ScheduledMessage.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.util.ArrayList;
+import java.util.Arrays;
import java.util.List;
import com.google.gson.Gson;
@@ -44,7 +44,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -52,7 +51,7 @@
/**
* the scheduled message content
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ScheduledMessage {
public static final String SERIALIZED_NAME_SENDER = "sender";
@SerializedName(SERIALIZED_NAME_SENDER)
@@ -254,25 +253,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to ScheduledMessage
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ScheduledMessage
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!ScheduledMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ScheduledMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in ScheduledMessage is not found in the empty JSON string", ScheduledMessage.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!ScheduledMessage.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("sender") != null && !jsonObj.get("sender").isJsonNull()) && !jsonObj.get("sender").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `sender` to be a primitive type in the JSON string but got `%s`", jsonObj.get("sender").toString()));
}
@@ -283,7 +283,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
throw new IllegalArgumentException(String.format("Expected the field `destination` to be a primitive type in the JSON string but got `%s`", jsonObj.get("destination").toString()));
}
// ensure the optional json data is an array if present
- if (jsonObj.get("destinations") != null && !jsonObj.get("destinations").isJsonArray()) {
+ if (jsonObj.get("destinations") != null && !jsonObj.get("destinations").isJsonNull() && !jsonObj.get("destinations").isJsonArray()) {
throw new IllegalArgumentException(String.format("Expected the field `destinations` to be an array in the JSON string but got `%s`", jsonObj.get("destinations").toString()));
}
if ((jsonObj.get("schedule") != null && !jsonObj.get("schedule").isJsonNull()) && !jsonObj.get("schedule").isJsonPrimitive()) {
@@ -311,9 +311,9 @@ public void write(JsonWriter out, ScheduledMessage value) throws IOException {
@Override
public ScheduledMessage read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/ScheduledMessageResponse.java b/src/main/java/org/openapitools/client/model/ScheduledMessageResponse.java
index 4441c56..4a84151 100644
--- a/src/main/java/org/openapitools/client/model/ScheduledMessageResponse.java
+++ b/src/main/java/org/openapitools/client/model/ScheduledMessageResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* ScheduledMessageResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ScheduledMessageResponse {
public static final String SERIALIZED_NAME_MESSAGEID = "messageid";
@SerializedName(SERIALIZED_NAME_MESSAGEID)
@@ -162,32 +161,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to ScheduledMessageResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ScheduledMessageResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!ScheduledMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ScheduledMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in ScheduledMessageResponse is not found in the empty JSON string", ScheduledMessageResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!ScheduledMessageResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessageResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessageResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : ScheduledMessageResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("messageid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `messageid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageid").toString()));
}
@@ -216,9 +216,9 @@ public void write(JsonWriter out, ScheduledMessageResponse value) throws IOExcep
@Override
public ScheduledMessageResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/ScheduledMessagesResponse.java b/src/main/java/org/openapitools/client/model/ScheduledMessagesResponse.java
index 2a2acae..7f2becf 100644
--- a/src/main/java/org/openapitools/client/model/ScheduledMessagesResponse.java
+++ b/src/main/java/org/openapitools/client/model/ScheduledMessagesResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import org.openapitools.client.model.ScheduledMessagesResponseMessage;
import com.google.gson.Gson;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* details of a message scheduled to be sent at a specified date and time
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ScheduledMessagesResponse {
public static final String SERIALIZED_NAME_STATUS = "status";
@SerializedName(SERIALIZED_NAME_STATUS)
@@ -217,25 +216,26 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to ScheduledMessagesResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ScheduledMessagesResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!ScheduledMessagesResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ScheduledMessagesResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in ScheduledMessagesResponse is not found in the empty JSON string", ScheduledMessagesResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!ScheduledMessagesResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessagesResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessagesResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString()));
}
@@ -244,7 +244,7 @@ public static void validateJsonObject(JsonObject jsonObj) throws IOException {
}
// validate the optional field `message`
if (jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) {
- ScheduledMessagesResponseMessage.validateJsonObject(jsonObj.getAsJsonObject("message"));
+ ScheduledMessagesResponseMessage.validateJsonElement(jsonObj.get("message"));
}
}
@@ -268,9 +268,9 @@ public void write(JsonWriter out, ScheduledMessagesResponse value) throws IOExce
@Override
public ScheduledMessagesResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/ScheduledMessagesResponseMessage.java b/src/main/java/org/openapitools/client/model/ScheduledMessagesResponseMessage.java
index 8e8f047..3a2408e 100644
--- a/src/main/java/org/openapitools/client/model/ScheduledMessagesResponseMessage.java
+++ b/src/main/java/org/openapitools/client/model/ScheduledMessagesResponseMessage.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import org.openapitools.client.model.ScheduledMessage;
import com.google.gson.Gson;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* ScheduledMessagesResponseMessage
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class ScheduledMessagesResponseMessage {
public static final String SERIALIZED_NAME_SCHEMA = "schema";
@SerializedName(SERIALIZED_NAME_SCHEMA)
@@ -133,28 +132,29 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to ScheduledMessagesResponseMessage
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to ScheduledMessagesResponseMessage
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!ScheduledMessagesResponseMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!ScheduledMessagesResponseMessage.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in ScheduledMessagesResponseMessage is not found in the empty JSON string", ScheduledMessagesResponseMessage.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!ScheduledMessagesResponseMessage.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessagesResponseMessage` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `ScheduledMessagesResponseMessage` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
// validate the optional field `schema`
if (jsonObj.get("schema") != null && !jsonObj.get("schema").isJsonNull()) {
- ScheduledMessage.validateJsonObject(jsonObj.getAsJsonObject("schema"));
+ ScheduledMessage.validateJsonElement(jsonObj.get("schema"));
}
}
@@ -178,9 +178,9 @@ public void write(JsonWriter out, ScheduledMessagesResponseMessage value) throws
@Override
public ScheduledMessagesResponseMessage read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/SendMessageResponse.java b/src/main/java/org/openapitools/client/model/SendMessageResponse.java
index d9139b0..6f44f56 100644
--- a/src/main/java/org/openapitools/client/model/SendMessageResponse.java
+++ b/src/main/java/org/openapitools/client/model/SendMessageResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,7 +14,6 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
@@ -22,6 +21,7 @@
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
import java.math.BigDecimal;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -43,7 +43,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -51,7 +50,7 @@
/**
* SendMessageResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class SendMessageResponse {
public static final String SERIALIZED_NAME_MESSAGEID = "messageid";
@SerializedName(SERIALIZED_NAME_MESSAGEID)
@@ -221,32 +220,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to SendMessageResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to SendMessageResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!SendMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!SendMessageResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in SendMessageResponse is not found in the empty JSON string", SendMessageResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!SendMessageResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendMessageResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `SendMessageResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : SendMessageResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("messageid").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `messageid` to be a primitive type in the JSON string but got `%s`", jsonObj.get("messageid").toString()));
}
@@ -275,9 +275,9 @@ public void write(JsonWriter out, SendMessageResponse value) throws IOException
@Override
public SendMessageResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/main/java/org/openapitools/client/model/TestResponse.java b/src/main/java/org/openapitools/client/model/TestResponse.java
index b9ec1fa..a54de3e 100644
--- a/src/main/java/org/openapitools/client/model/TestResponse.java
+++ b/src/main/java/org/openapitools/client/model/TestResponse.java
@@ -1,9 +1,9 @@
/*
* The SMS Works API
- * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed messages are refunded.
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
*
* The version of the OpenAPI document: 1.9.0
- *
+ * Contact: support@thesmsworks.co.uk
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
@@ -14,13 +14,13 @@
package org.openapitools.client.model;
import java.util.Objects;
-import java.util.Arrays;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;
+import java.util.Arrays;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
@@ -42,7 +42,6 @@
import java.util.HashSet;
import java.util.List;
import java.util.Map;
-import java.util.Map.Entry;
import java.util.Set;
import org.openapitools.client.JSON;
@@ -50,7 +49,7 @@
/**
* TestResponse
*/
-@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-07-14T11:38:52.349531+01:00[Europe/London]")
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2023-12-15T11:27:24.989260Z[Europe/London]")
public class TestResponse {
public static final String SERIALIZED_NAME_MESSAGE = "message";
@SerializedName(SERIALIZED_NAME_MESSAGE)
@@ -133,32 +132,33 @@ private String toIndentedString(Object o) {
}
/**
- * Validates the JSON Object and throws an exception if issues found
+ * Validates the JSON Element and throws an exception if issues found
*
- * @param jsonObj JSON Object
- * @throws IOException if the JSON Object is invalid with respect to TestResponse
+ * @param jsonElement JSON Element
+ * @throws IOException if the JSON Element is invalid with respect to TestResponse
*/
- public static void validateJsonObject(JsonObject jsonObj) throws IOException {
- if (jsonObj == null) {
- if (!TestResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!TestResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
throw new IllegalArgumentException(String.format("The required field(s) %s in TestResponse is not found in the empty JSON string", TestResponse.openapiRequiredFields.toString()));
}
}
- Set> entries = jsonObj.entrySet();
+ Set> entries = jsonElement.getAsJsonObject().entrySet();
// check to see if the JSON string contains additional fields
- for (Entry entry : entries) {
+ for (Map.Entry entry : entries) {
if (!TestResponse.openapiFields.contains(entry.getKey())) {
- throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TestResponse` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
+ throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TestResponse` properties. JSON: %s", entry.getKey(), jsonElement.toString()));
}
}
// check to make sure all required properties/fields are present in the JSON string
for (String requiredField : TestResponse.openapiRequiredFields) {
- if (jsonObj.get(requiredField) == null) {
- throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonObj.toString()));
+ if (jsonElement.getAsJsonObject().get(requiredField) == null) {
+ throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString()));
}
}
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
if (!jsonObj.get("message").isJsonPrimitive()) {
throw new IllegalArgumentException(String.format("Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString()));
}
@@ -184,9 +184,9 @@ public void write(JsonWriter out, TestResponse value) throws IOException {
@Override
public TestResponse read(JsonReader in) throws IOException {
- JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
- validateJsonObject(jsonObj);
- return thisAdapter.fromJsonTree(jsonObj);
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ return thisAdapter.fromJsonTree(jsonElement);
}
}.nullSafe();
diff --git a/src/test/java/org/openapitools/client/api/OneTimePasswordApiTest.java b/src/test/java/org/openapitools/client/api/OneTimePasswordApiTest.java
new file mode 100644
index 0000000..11fd843
--- /dev/null
+++ b/src/test/java/org/openapitools/client/api/OneTimePasswordApiTest.java
@@ -0,0 +1,74 @@
+/*
+ * The SMS Works API
+ * The SMS Works provides a low-cost, reliable SMS API for developers. Pay only for delivered texts, all failed UK messages are refunded.
+ *
+ * The version of the OpenAPI document: 1.9.0
+ * Contact: support@thesmsworks.co.uk
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+
+
+package org.openapitools.client.api;
+
+import org.openapitools.client.ApiException;
+import org.openapitools.client.model.ErrorModel;
+import org.openapitools.client.model.OTP;
+import org.openapitools.client.model.OTPResponse;
+import org.openapitools.client.model.OTPVerify;
+import org.openapitools.client.model.OTPVerifyResponse;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * API tests for OneTimePasswordApi
+ */
+@Disabled
+public class OneTimePasswordApiTest {
+
+ private final OneTimePasswordApi api = new OneTimePasswordApi();
+
+ /**
+ * Retrieve an OTP by it's message ID
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void otpMessageidGetTest() throws ApiException {
+ String messageid = null;
+ OTPVerifyResponse response = api.otpMessageidGet(messageid);
+ // TODO: test validations
+ }
+
+ /**
+ * Generates and sends a One-Time Password
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void otpSendPostTest() throws ApiException {
+ OTP otp = null;
+ OTPResponse response = api.otpSendPost(otp);
+ // TODO: test validations
+ }
+
+ /**
+ * Generates and sends a One-Time Password
+ *
+ * @throws ApiException if the Api call fails
+ */
+ @Test
+ public void otpVerifyPostTest() throws ApiException {
+ OTPVerify passcode = null;
+ OTPVerifyResponse response = api.otpVerifyPost(passcode);
+ // TODO: test validations
+ }
+
+}